accuracy of asinh and atanh

Matt Peddie mpeddie at
Sat Jun 2 05:23:22 UTC 2018

Hi devs,

I tried to use  asinh :: Double -> Double  and discovered that it's
inaccurate compared to my system library (GNU libm), even returning
-Infinity in place of finite values in the neighborhood of -22 for
large negative arguments.  `atanh` is also inaccurate compared to the
system library.  I wrote up a more detailed description of the problem
including plots in the README file at -- this repository is
package that can help you examine the error for yourself or generate
the plots, and it also contains accurate pure-Haskell translations of
the system library's implementation for these functions.  What's the
next step to fixing this in GHC?


Matt Peddie

More information about the ghc-devs mailing list