www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20282] New: CustomFloat.dig fails at some values.

https://issues.dlang.org/show_bug.cgi?id=20282

          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 puremagic.com
          Reporter: bugzilla 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.

--
Oct 08 2019