accuracy of asinh and atanh

Ben Gamari ben at
Thu Aug 2 01:33:21 UTC 2018

Matt Peddie <mpeddie at> writes:

> Hi George,
> Not a stupid question.  I don't have a single source at hand, but I
> think I read in a few places on the wiki that calling out to the
> system math library is not an option due to the variety of system math
> libraries on the platforms GHC supports.  It'd be great if I got the
> wrong impression and this could just be a call to C.  Can anyone set
> me straight on this point?
Indeed it's not a stupid question at all. Indeed this is precisely what
we do for the simpler transcendentals (e.g. sin, asin, log). We very
well could move in this direction in the case of asinh/atanh as well. I
believe the reason we don't currently is that atanh was only
standardized in C99, which we only started requiring a few releases ago.
Perhaps this is ultimately the right direction.


- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list