trait Arithmetic = Sized
+ Add<Output = Self>
+ for<'a> Add<&'a Self, Output = Self>
+ AddAssign
+ for<'a> AddAssign<&'a Self>
+ Sub<Output = Self>
+ for<'a> Sub<&'a Self, Output = Self>
+ SubAssign
+ for<'a> SubAssign<&'a Self>
+ Mul<Output = Self>
+ for<'a> Mul<&'a Self, Output = Self>
+ MulAssign
+ for<'a> MulAssign<&'a Self>
+ Div<Output = Self>
+ for<'a> Div<&'a Self, Output = Self>
+ DivAssign
+ for<'a> DivAssign<&'a Self>
+ Neg<Output = Self>
+ NegAssign
+ LowerExp;Expand description
A convenience trait alias that aggregates the standard arithmetic operations.
This trait alias bundles the common arithmetic operator traits from std::ops
(e.g., Add, Sub, Mul, Div, and their *Assign variants)
into a single super-trait. It is used as a bound on FpScalar to ensure
all scalar types support basic arithmetic.
This trait alias does not require Copy. Instead, it explicitly requires that
arithmetic operations are implemented for both owned values (Self) and
references (&Self). This provides flexibility for both move and copy semantics,
allowing implementors to avoid unnecessary clones in performance-sensitive code.