-
Notifications
You must be signed in to change notification settings - Fork 102
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
erfc(::BigFloat) crashes Julia #127
Comments
This is an MPFR assertion failure, so it looks like a bug in MPFR that should be reported there? |
The MPFR release notes state that they fixed a bug related to
But Julia 1.0.1 is using MPFR 4.0.1, so maybe this is different? |
Nope, it seems like the problem is still present with Julia 1.0.1 and MPFR 4.0.1: julia> using SpecialFunctions
julia> erfc(big"30.5")
/Users/osx/buildbot/slave/package_osx64/build/deps/srccache/mpfr-4.0.1/src/uceil_log2.c:40: MPFR assertion failed: exp < 1023 |
I don't quite understand their release notes, but it looks like those are the bugs that have been identified in the 4.0.1 release (since it seems like patch 11 is not in 4.0.1). So looks like we need to wait until the next MPFR release. |
Since switching to Julia 1.0.2 did not solve the problem for me either, I built my own libmpfr from subversion (revision 13311) and placed it in julia's lib directory. The result is positive. julia> erfc(big"30")
2.564656203756111600033397277501447146548889722778617054122599586184238694779193e-393 So, this issue can probably be closed. |
I think we should keep the issue open so we don't lose track of it, since we'll need to bump Julia's MPFR version when a newer one is available. |
New version of MPFR has been released, see JuliaLang/julia#31041 |
Fixed on master. |
master of what? Julia? |
I tested on a few day old master of Julia, with SpecialFunctions v1.4.2 |
I can't reproduce with SpecialFunctions v0.7.1 on Julia v1.0.5 on linux, which is close to (but not exactly the same) the setup of the original report, so I'm not sure that the fact you can't reproduce the bug now with a recent version of Julia/SpecialFunctions means that the bug has been fixed, maybe you also couldn't reproduce it before. But it looks like no one else has been able to reproduce it either and the OP had already a working setup 2.5 years ago, so probably not worth keeping this open anyway. |
Julia 0.7 crashes whenever I call
SpecialFunctions.erfc
with aBigInt
orBigFloat
value near 30. For exampleerfc(big"26.5")
anderfc(big"32.0")
are ok, buterfc(big"27.0")
anderfc(big"31.5")
will fail.BigInt
s in that range will also fail, but the correspondingFloat64
andInt64
will succeed.I am using
SpecialFunctions
v0.7.1 on Julia 0.7.The text was updated successfully, but these errors were encountered: