real number floating point function errors (Windows only)
Several mathematical functions (asinh, etc) on Double and Float give incorrect values (in Windows only).
Steps to reproduce
Evaluate the following in GHCi on Windows:
> asinh 0 -0.0 > atanh (-0) 0.0 > asinh 1e300 NaN
> asinh 0 0.0 > atanh (-0) -0.0 > asinh 1e300 691.4686750787736
(This is correct, and what you get in Linux).
- GHC version used: 8.10.7
- Operating System: Windows
- System Architecture:
The third example here is the cause of issue #15670 (closed).
I've coded some fixes here.
The github repo also includes some tests (and I'm trying to develop more and may uncover additional issues). I'd like to include a fuller set of tests in both GHC and mingw-w64 (if it has CI testing).
The repo also has tests and fixes for complex number problems (that I'll raise as a separate issue since the fixes are in the GHC code).