<div dir="ltr">I would also note that %f is the wrong printf flag to use with a double; you want %d. This shouldn't affect the result since you're only printing one value, but I don't know the Windows ABI so conceivably it might.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 3, 2021 at 8:43 AM arata, mizuki <<a href="mailto:minorinoki@gmail.com">minorinoki@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi David,<br>
<br>
If I understand correctly, GHC uses mingw-w64’s libc implementation on Windows.<br>
Since mingw-w64’s math functions are not of very good quality, it is likely that asinh returns NaN for a very large input.<br>
<br>
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.<br>
As a note, you may get a different (compile-time computed) result for `asinh(x)` if you set a more aggressive optimization flag.<br>
<br>
Mizuki<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>