www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19976] New: Simplify std.internal.convert.toUbyte CTFE path

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

          Issue ID: 19976
           Summary: Simplify std.internal.convert.toUbyte CTFE path for
                    float and double
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

DMD supports `(double x) => *cast(ulong*) &x` and `(int y) => *cast(uint*) &y`
during CTFE so there's no need for elaborate measures to determine the bitwise
representation of floats and doubles in CTFE.

--
Jun 16 2019