[phobos] master phobos brunch, weird bug
Dmitry Olshansky
dmitry.olsh at gmail.com
Wed Mar 30 15:06:27 PDT 2011
Ok, I got this one sorted out - I should have built the latest dmd from
git instead of using the one from the last release.
> core.exception.AssertError at std.conv(2509): unittest failure
> ----------------
> core.exception.AssertError at std\json.d(459): 1223 should be 1.223e+24
> ----------------
> ...
> Closer examination shows that this test fails:
> f = to!float( "123e+2" );
> assert( f == 123e+2f ); //replacing with writeln shows... 123 WTF??!
> And then mystery continues as placing writeln in one branch of parse
> makes it work again!
> (but fills screen with neat column of numbers)
> At conv.d:1569
> ...
> while (exp > 0)
> {
> while (exp >= pow)
> {
> ldval *= postab[u];
> exp -= pow;
> writeln(u); // <<<< here!
> }
> pow >>= 1;
> u++;
> }
> ...
--
Dmitry Olshansky
More information about the phobos
mailing list