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

David Nadlinger <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from David Nadlinger <[email protected]> ---
When porting LDC to Windows, I had to deal with a large number of such issues
that manifested in a similar way (absurd floating point results). The root
cause always was that the MSVC runtime does not support reals ("long double" in
C land, i.e. x87 80 bit floats) at all. This leads to situations where D code
is calling a function (say snprintf) with some floating point arguments on the
x87 stack, but the called function reads them from the XMM registers or the
regular stack.

If I remember correctly, DMD also uses 80 bit reals on Win64. This can't work
unless it comes with its own string formatting/math/etc. routines. For
LDC/MinGW, we just use the MinGW ones which do properly support long doubles,
but I'm not sure what the intended solution for DMD is.

--

Reply via email to