[Issue 2973] std.math.pow(int, int), etc.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 21 19:19:38 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2973


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at metalanguage.com




--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com>  2009-07-21 19:19:38 PDT ---
We currently have:

pure nothrow F pow(F)(F x, uint n) if (isFloatingPoint!(F));
pure nothrow F pow(F)(F x, int n) if (isFloatingPoint!(F));
F pow(F)(F x, F y) if (isFloatingPoint!(F));

I think we're in good shape. We could add overloads for raising integrals to
unsigned powers but I fear confusion due to wraparound. The magnitudes of
exponents for which efficiency could become an issue are also those that would
wraparound the result. If no compelling arguments come up, I'll close this
soon.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list