[Issue 20282] New: CustomFloat.dig fails at some values.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 8 14:24:43 UTC 2019


          Issue ID: 20282
           Summary: CustomFloat.dig fails at some values.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at d-ecke.de

CustomFloat!(10,5).dig == 2, but should be 3 in my oppinion.

With 10 bits in the mantissa (without leading 1) you can represent multiples of
0.5^^10 = 0.0009765625. This is IMHO enough for 3 digits of precision, because
all numbers between 0.001 and 0.999 have a different representation.


More information about the Digitalmars-d-bugs mailing list