[Issue 3520] std.numeric.CustomFloat horribly broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 8 10:49:10 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3520



--- Comment #4 from Rob Jacques <sandford at jhu.edu> 2010-04-08 10:49:06 PDT ---
The bit layout of custom float is not IEEE compliant and can't be used to
represent half, float nor double types.

Here's the correct layout
    private mixin(bitfields!(
                  uint, "fraction", fractionBits,
                  uint, "exponent", exponentBits,
                  bool,   "sign",   signBit));

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list