[phobos] phobos commit, revision 1559

Shin Fujishiro rsinfu at gmail.com
Wed May 26 22:03:17 PDT 2010


Brad Roberts <braddr at puremagic.com> wrote:
> Um.. double check your revert.. it looks like it's yet again different.
> 
> One example:
> 
> r1557:
> 1882	 	    f = to!float("1.17549435e-38");
> 1883	 	    assert(feq(cast(real)f, cast(real)1.17549e-38));
>  	1882	    f = to!float("1.1755e-38");
>  	1883	    assert(feq(cast(real)f, cast(real)1.1755e-38));
> 
> r1559:
> 1882	 	    f = to!float("1.1755e-38");
> 1883	 	    assert(feq(cast(real)f, cast(real)1.1755e-38));
>  	1882	    f = to!float("1.17549e-38");
>  	1883	    assert(feq(cast(real)f, cast(real)1.17549e-38));
> 
> So, the code isn't back the way it was.
> 
> Sigh,
> Brad

It is the initial state (<= r1512).  I have edited those portions twice
in r1513 and r1559.  In this revision I reverted both my changes
because the two edit were just workarounds for inaccurate strtol*().

I fixed inconsistent test values though:

std.conv [r1512:r1559]
--------------------
1885	 	    f = to!float("3.40282e+38");
 	1885	    f = to!float("3.4028e+38");
1886	1886	    assert(to!string(f) == to!string(3.40282e+38));

1931	 	    d = to!double("2.22507e-308");
 	1931	    d = to!double("2.22508e-308");
1932	1932	    assert(feq(cast(real)d, cast(real) 2.22508e-308));
--------------------
http://www.dsource.org/projects/phobos/changeset?new=trunk/phobos/std/conv.d@1559&old=trunk/phobos/std/conv.d@1512


Shin


More information about the phobos mailing list