-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix floating point #3
Conversation
Well julia> typemax(Int32) * eps(Float32)
256.0f0 Having @matbesancon does that reasoning sound right to you? If yes, then I'm ready to merge. |
Is this reasonable to expect a graph with |
Yes, typemax(Int32) is only |
@gdalle Can you check this is alright and integrate the PR in your move towards Graphs.jl? |
This is a repost of my PR on LightGraphsFlows.jl.
Closes #28.
is_zero
is necessary because when comparing against zero, this is equivalent to strict equality (only absolute difference is tolerated).eps
is not defined for Integers so we need to separateAbstractFloat
fromInteger
.From last PR, I re-coded the
is_zero
function to take advantage of multiple dispatch, and added a non regression test.As we only add errors, should I use
nv(g)*eps(T)
instead ofsqrt(eps(T))
?