MutableArithmetics.jl icon indicating copy to clipboard operation
MutableArithmetics.jl copied to clipboard

Interface for arithmetics on mutable types in Julia

Results 21 MutableArithmetics.jl issues
Sort by recently updated
recently updated
newest added

Does MutableArithmetics not work for general functions, only for the standard arithmetic operations (+,-,/,*)? I have a mutable type that overrides many of the Base functions (sin, cos, abs, sqrt,...

```julia 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>...

``` | | |_| | | | (_| | | Version 1.10.0-DEV.982 (2023-04-10) _/ |\__'_|_|_|\__'_| | Commit ea72b942792 (4 days old master) |__/ | julia> using Test, MutableArithmetics WARNING: using...

No result for `buffer_for` on https://jump.dev/MutableArithmetics.jl/dev/, but there's a usage example of `buffer_for` in the README.

Trying to make this work `operate!(add_dot, BigInt(), [A, A], [A, A])` where `A = ones(BigInt, 2, 2)` to remove the need for such hacks: https://github.com/kalmarek/PropertyT.jl/blob/master/src/sos_sdps.jl#L144-L173 cc @kalmarek

After #211 it might also make sense to implement the three-argument `BigFloat` versions of the `add_mul` and `sub_mul` operations in terms of `mpfr_fma` and `mpfr_fms`.

It is used https://github.com/JuliaAlgebra/MultivariatePolynomials.jl/blob/c9cbca9fcc0d9d6bafced0d983d20e673a50a1bd/src/division.jl#L271 and it should be used https://github.com/JuliaAlgebra/MultivariatePolynomials.jl/blob/c9cbca9fcc0d9d6bafced0d983d20e673a50a1bd/src/division.jl#L53 Once it's done, we should see nice improvements for https://github.com/JuliaAlgebra/MultivariatePolynomials.jl/issues/194

We should make it possible for downstream packages to run the tests with the new rewrite system.

The `dispatch.jl` file is only 47% tested: https://app.codecov.io/gh/jump-dev/MutableArithmetics.jl/blob/master/src/dispatch.jl We should go through, remove the old hacks https://github.com/jump-dev/MutableArithmetics.jl/blob/b46f175434b24b7ade6108677ecde4c14b44a2c3/src/dispatch.jl#L751-L777 and add tests. Once upon a time, I tried this https://github.com/jump-dev/MutableArithmetics.jl/pull/78. My mistake...