On 5/26/2010 7:21 AM, dsource.org wrote:
> phobos commit, revision 1559
>
>
> user: rsinfu
>
> msg:
> Reverted r1557 (and r1513 partially).
>
> r1557 relaxed some unittests, as some platforms had accuracy problem with
> strtold(). But the strict unittests were requirements for D; so r1557 should
> be reverted.
>
> With this change, these unittests will fail on some platforms such as OSX and
> Gentoo. However, the unittests SHOULD fail because using strtold() on these
> platforms is a 'bug' -- we should provide an accurate implementation.
>
> Related issues:
> 3758: Create D impementation of to!(float, string), etc.
> 4200: "to!real(to!string(real.min_normal))" raises std.conv.ConvError
>
> http://www.dsource.org/projects/phobos/changeset/1559
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
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos