
3 Sep
2021
3 Sep
'21
8:42 a.m.
Hi David, If I understand correctly, GHC uses mingw-w64’s libc implementation on Windows. Since mingw-w64’s math functions are not of very good quality, it is likely that asinh returns NaN for a very large input. As to why `asinh(1.7976931348623157e308)` in CAsinh.c produces (seemingly-correct) 710.4758, it is probably because the C compiler (GCC) uses a different implementation of asinh when doing constant folding. As a note, you may get a different (compile-time computed) result for `asinh(x)` if you set a more aggressive optimization flag. Mizuki