# `Mutare.Decimal.Arithmetic`
[🔗](https://github.com/foxbenjaminfox/mutare_decimal/blob/v0.2.1/lib/mutare/decimal/arithmetic.ex#L1)

:decimal_arithmetic — swaps Decimal arithmetic calls for other operations of the same arity and
reverses operands for non-commutative arithmetic calls.

Function-name swaps keep the original arguments:

    Decimal.add(a, b)     # -> Decimal.sub(a, b) / Decimal.mult(a, b)
    Decimal.sub(a, b)     # -> Decimal.add(a, b)
    Decimal.mult(a, b)    # -> Decimal.div(a, b)
    Decimal.div(a, b)     # -> Decimal.mult(a, b) / Decimal.div_int(a, b)
    Decimal.div_int(a, b) # -> Decimal.rem(a, b) / Decimal.div(a, b)
    Decimal.rem(a, b)     # -> Decimal.div_int(a, b)

It also reverses the operands of Decimal.sub/2, div/2, div_int/2, and rem/2 when they are
written differently:

    Decimal.sub(a, b) # -> Decimal.sub(b, a)

It resolves qualified, aliased, and imported Decimal calls through Mutare's call resolver. A
pipe stage is the call it stands for, so `a |> Decimal.sub(b)` gets the same mutants as
`Decimal.sub(a, b)`, its operand reversal included.

# `variants`

```elixir
@spec variants() :: [atom()]
```

The target-operation labels accepted by qualified mutare ignore directives.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
