We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SimpleRatio would benefit from overflow protection via SaferIntegers.jl.
SimpleRatio
The main issue I see at the moment is that SafeSigned and SafeUnsigned have SafeInteger as a supertype rather than Signed and Unsigned:
SafeSigned
SafeUnsigned
SafeInteger
Signed
Unsigned
julia> supertype(SafeSigned) SafeInteger julia> supertype(SafeUnsigned) SafeInteger julia> using Ratios, SaferIntegers julia> -SimpleRatio(SafeInt(3), SafeInt(5)) ERROR: MethodError: no method matching -(::SimpleRatio{SafeInt64})
Thus we would need this method via Requires.jl:
Base.:-(x::SimpleRatio{T}) where {T<:SafeSigned} = SimpleRatio(-x.num, x.den)
The text was updated successfully, but these errors were encountered:
x.f. JuliaMath/Interpolations.jl#457
Sorry, something went wrong.
Closed by JeffreySarnoff/SaferIntegers.jl#20 and subsequent ambiguity pull requests.
No branches or pull requests
SimpleRatio
would benefit from overflow protection via SaferIntegers.jl.The main issue I see at the moment is that
SafeSigned
andSafeUnsigned
haveSafeInteger
as a supertype rather thanSigned
andUnsigned
:Thus we would need this method via Requires.jl:
The text was updated successfully, but these errors were encountered: