[D-runtime] FPU in core.time
Jonathan M Davis
jmdavisProg at gmx.com
Sun Jan 15 23:22:48 PST 2012
On Monday, January 16, 2012 06:00:24 Martin Nowak wrote:
> There are some failing unittests in core.time.
>
> core.time(1754):
> unittest
> {
> immutable curr = TickDuration.currSystemTick;
> TickDuration t1 = curr;
> immutable t2 = curr + curr;
> t1 *= 2;
> assert(t1 == t2);
>
> t1 = curr;
> t1 *= 2.0; //<- This relies on 80-bit arithmetic and might fail
> since it is done on SSE
> assert(t1 == t2);
> }
So, you can't rely on 2.0 * i being twice i anymore? I hate floating point
values...
- Jonathan M Davis
More information about the D-runtime
mailing list