-
Notifications
You must be signed in to change notification settings - Fork 10
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
Dividing x ≠ 0 by zero returns NaN instead of ±Inf #12
Comments
Hey @mtanneau , thank you for you interest in my project! You are absolutely correct that the types provided by MultiFloats.jl do not have proper IEEE These expressions are inherently unfriendly to This isn't to say the situation is hopeless, though! I am certainly interested in making MultiFloats.jl compatible with as many libraries as I can. Does Tulip.jl crucially depend on
where we could just take the performance hit for the bits that matter. In any case, thanks for bringing this issue to my attention. Violation of IEEE semantics, even if intentional, is a design deficiency that should be documented loud and clear on the MultiFloat.jl readme, so I'll go ahead and add a note about it. |
Thanks for the answer :) I dug into my code a bit more. As far as I can tell, my issues comes from updates of the form (FYI, there are other parts where a division by zero might happen, but in that case the result would be multiplied by |
Excellent! I'm glad to hear that the issue could be handled on your side. By the way, since you're using MultiFloats.jl for optimization, you'll be glad to hear that I fixed a bug today where needless destructive cancellation would occur when subtracting two MultiFloats that are very close in magnitude. I actually have my own collection of nonlinear optimization routines for use with MultiFloats.jl, and this was driving me crazy. ("I'm turning up the precision, why isn't the objective going down???") I'll make the v1.0 release of MultiFloats.jl imminently, with this fix and a couple enhancements. |
v1.0 of MultiFloats.jl is now released! Closing this issue, as I've added a "Caveats" section to the README which documents violation of strict IEEE |
The convention for dividing by zero is not uniform across all levels of precision:
Is it possible to have
Float64x2
, etc follow the same convention asFloat64
?I have parts of my code in Tulip.jl that rely on this convention.
I think this should cover all cases:
x
y
x/y
+Inf
+Inf
NaN
-Inf
+Inf
The text was updated successfully, but these errors were encountered: