Thread overview | |||||
---|---|---|---|---|---|
|
December 22, 2006 [Issue 715] New: incorrect IEEE 754 handling of -0i and +0i | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=715 Summary: incorrect IEEE 754 handling of -0i and +0i Product: D Version: 0.177 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: thomas-dloop@kuehne.cn # # union F{ # float f; # uint i; # } # # union I{ # ifloat f; # uint i; # } # # void foo(){ # // success with "float" # F f; # f.f = 0.0f; # f.f *= -1.0f; # assert(f.i == 0x80000000); # # // failure with "ifloat" # I i; # i.f = 0.0fi; # i.f *= -1.0fi; # assert(i.i == 0x80000000); # } # test cases: http://dstress.kuehne.cn/run/ieee_754_zerosdq_01.d http://dstress.kuehne.cn/run/ieee_754_zerosdq_02.d http://dstress.kuehne.cn/run/ieee_754_zerosdq_03.d http://dstress.kuehne.cn/run/ieee_754_zerosdq_04.d -- |
December 23, 2006 Re: [Issue 715] New: incorrect IEEE 754 handling of -0i and +0i | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | This creates a real, not an imaginary. It shouldn't compile at all.
> # union I{
> # ifloat f;
> # uint i;
> # }
> #
> # void foo(){
> # I i;
> # i.f = 0.0fi;
> # i.f *= -1.0fi; << This should be i.f *= -1.0f;
> # assert(i.i == 0x80000000);
> # }
|
December 23, 2006 [Issue 715] incorrect IEEE 754 handling of -0i and +0i | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=715 thomas-dloop@kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #2 from thomas-dloop@kuehne.cn 2006-12-23 07:13 ------- Thanks for catching this. I've fixed the test cases and refiled the issue as #730 -- |
Copyright © 1999-2021 by the D Language Foundation