[Issue 715] New: incorrect IEEE 754 handling of -0i and +0i

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 22 05:23:43 PST 2006


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 at digitalmars.com
        ReportedBy: thomas-dloop at 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


-- 



More information about the Digitalmars-d-bugs mailing list