std.math: №2, fix abs, fabs#3012
Conversation
intrinsic for `fabs` should be added to DMD. fix unittest
There was a problem hiding this comment.
Sorry to be picky, but afaik there should be no FIXME in a pull request.
There was a problem hiding this comment.
No. I have already pushed scores of FIXMEs into phobos. This is normal practise if DMD should be changed first.
There was a problem hiding this comment.
Fix code like
double fabs(double x) @safe pure nothrow @nogc { return fabs(cast(real)x); }to declaration
double fabs(double x) @safe pure nothrow @nogc;when DMD implement this intrinsic.
|
There is |
|
This PRs have few goals:
This isn't change for |
|
PS: |
|
Could you add a unittest that calls all three version, simular to what is done in std.string foreach (S; TypeTuple!(float, double, real)) |
|
Unittest was added. |
|
Thank, LGTM |
|
Auto-merge toggled on |
|
This pull request introduced a regression: |
|
... and this is good because implementation bugs like in |
intrinsics for
fabsshould be added to DMD.