std.math: added frexp for double and float#2508
std.math: added frexp for double and float#2508quickfur merged 4 commits intodlang:masterfrom 9il:frexp-single-double
Conversation
|
Pinging @ibuclaw for review. Hopefully I'll be able to look into the intrinsics side of things soon. |
|
Looks fine to me. |
std/math.d
Outdated
There was a problem hiding this comment.
Nitpick: please indent the sig constraint by 4 spaces.
std/math.d
Outdated
There was a problem hiding this comment.
Can I remove prototypes and leave only template?
There was a problem hiding this comment.
This stuff:
///ditto
double frexp(double value, out int exp) @trusted pure nothrow @nogc
{ return frexpImpl(value, exp); }There was a problem hiding this comment.
For example isNaN is a template.
There was a problem hiding this comment.
You could try it, but I remember recently there was a problem where the compiler autopromoted everything to double (or was it real?), resulting in inefficient generated code. You'll have to check the disassembly to make sure this isn't happening if you remove the "prototypes".
There was a problem hiding this comment.
A have checked 32/64 bit, with and without -O. All works fine.
|
LGTM. |
|
Auto-merge toggled on |
|
Thanks! |
std.math: added frexp for double and float
For speed.