[Issue 3240] std.numeric.findRoot only works with real

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 10 07:14:57 PDT 2009


--- Comment #4 from Andrei Alexandrescu <andrei at metalanguage.com>  2009-08-10 07:14:55 PDT ---
(In reply to comment #3)
> There's an even simpler fix -- i.e. less typing. :)
> Since both a, b and c are of type T, this also works:
>   599   if (a==0) c = ieeeMean!T(copysign(0.0L, b), b);
>   600   else if (b==0) c = ieeeMean!T(copysign(0.0L, a), a);
> I've added this fix to my local Phobos. I just tried this for fun, and expected
> to get an error from trying to implicitly cast real to double. But for some
> reason it worked.

Don, sorry, I took this over before seeing you are considering working on it.
You may want to take ownership. Thanks!

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