-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gamma function overflows on Windows, but not on WSL2/Ubuntu #309
Comments
Note that this method is simply calling In particular, try calling MPFR directly: z = BigFloat()
ccall((:mpfr_gamma, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Int32), z, big(3.6e13), Base.MPFR.ROUNDING_MODE[])
z If that still has a problem, then you can file a Julia issue, since we can't fix MPFR in the SpecialFunctions package. |
You truncated the output, the actual result is:
In particular, if you look at the exponent, it is
The problem is that the exponent is stored as a C |
Indeed, I can confirm that calling MPFR directly yields the same behaviour: overflow under Windows and not under Linux. |
The
gamma
function behaves differently on ordinary Windows 10 and under WSL2/Ubuntu.These are both on the same computer:
WLS2:
Windows 10:
Version info:
WLS2:
Windows 10:
The text was updated successfully, but these errors were encountered: