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
DivideError
mutability(T, div, T, T)
T == Rational{BigInt}
julia> import MutableArithmetics julia> f(op::F, ::Type{T}) where {F, T} = MutableArithmetics.mutability(T, op, T, T) f (generic function with 1 method) julia> f(/, BigInt) MutableArithmetics.IsNotMutable() julia> f(div, BigInt) MutableArithmetics.IsMutable() julia> f(/, Rational{BigInt}) MutableArithmetics.IsMutable() julia> f(div, Rational{BigInt}) ERROR: DivideError: integer division error Stacktrace: [1] tdiv_q!(x::BigInt, a::BigInt, b::BigInt) @ Base.GMP.MPZ ./gmp.jl:165 [2] tdiv_q @ ./gmp.jl:166 [inlined] [3] div @ ./gmp.jl:508 [inlined] [4] div @ ./gmp.jl:512 [inlined] [5] divgcd(x::BigInt, y::BigInt) @ Base ./rational.jl:43 [6] div(x::Rational{BigInt}, y::Rational{BigInt}, r::RoundingMode{:ToZero}) @ Base ./rational.jl:481 [7] div @ Base ./rational.jl:488 [inlined] [8] div @ Base ./rational.jl:492 [inlined] [9] promote_operation_fallback @ MutableArithmetics ~/tmp/jl/MutableArithmetics.jl/src/interface.jl:51 [inlined] [10] promote_operation @ MutableArithmetics ~/tmp/jl/MutableArithmetics.jl/src/interface.jl:113 [inlined] [11] mutability @ MutableArithmetics ~/tmp/jl/MutableArithmetics.jl/src/interface.jl:266 [inlined] [12] f(op::typeof(div), ::Type{Rational{BigInt}}) @ Main ./REPL[2]:1 [13] top-level scope @ REPL[6]:1 (@v1.11) pkg> st MutableArithmetics Status `~/.julia/environments/v1.11/Project.toml` [d8a4904e] MutableArithmetics v1.3.3 `~/tmp/jl/MutableArithmetics.jl`
The text was updated successfully, but these errors were encountered:
operate
It's just missing a promote_operation method it seems. By the way if you're interested in rational mutable arithmetics, there is a WIP PR in #141
promote_operation
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: