Phobos unit testing uncovers a CPU bug

so so at so.do
Mon Nov 29 06:19:32 PST 2010


> import std.conv: to;
> void main() {
>     auto r = to!real("0x1.0076fc5cc7933866p+40L");
>     auto d = to!double("0x1.0076fc5cc7933866p+40L");
>     auto f = to!float("0x1.0076fc5cc7933866p+40L");
> }
>
>
>> Regarding unit tests, I should really use them :(
>
> Yep, and DbC too, and compile your D code with -w.
>
> Bye,
> bearophile

I have an unrelated question, this is not a criticism but an honest one.
Why don't you write these 3 lines like:

>     auto r = to!real  ("0x1.0076fc5cc7933866p+40L");
>     auto d = to!double("0x1.0076fc5cc7933866p+40L");
>     auto f = to!float ("0x1.0076fc5cc7933866p+40L");

Thank you.

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d-announce mailing list