www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20361] New: denormalized floatingpoint number literals do not

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

          Issue ID: 20361
           Summary: denormalized floatingpoint number literals do not work
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla d-ecke.de

void main()
{
    float f = 1e-40f;
}

Compiling with dmd produces:

test.d(3): Error: number 1e-40f is not representable

But it is representable. The bit pattern is:

0 00000000 00000010001011011000010

--
Nov 06 2019