pub enum ArithmeticOperator {
Add,
Subtract,
Multiply,
Divide,
Remainder,
Power,
}Expand description
Arithmetic operators for numeric computations.
Variants§
Add
Addition (lhs + rhs)
Subtract
Subtraction (lhs - rhs)
Multiply
Multiplication (lhs * rhs)
Divide
Division (lhs / rhs)
For integers, division by zero panics in dense arrays and nullifies in masked arrays. For floating-point, follows IEEE 754 (yields ±Inf or NaN).
Remainder
Modulus/remainder operation (lhs % rhs)
Behaviour matches Rust’s % operator. Division by zero handling follows same
rules as Divide operation.
Power
Exponentiation (lhs ^ rhs)
For integers, uses repeated multiplication. For floating-point, uses pow() function.
Negative exponents on integers may yield zero due to truncation.
Trait Implementations§
Source§impl Clone for ArithmeticOperator
impl Clone for ArithmeticOperator
Source§fn clone(&self) -> ArithmeticOperator
fn clone(&self) -> ArithmeticOperator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArithmeticOperator
impl Debug for ArithmeticOperator
Source§impl PartialEq for ArithmeticOperator
impl PartialEq for ArithmeticOperator
impl Copy for ArithmeticOperator
impl Eq for ArithmeticOperator
impl StructuralPartialEq for ArithmeticOperator
Auto Trait Implementations§
impl Freeze for ArithmeticOperator
impl RefUnwindSafe for ArithmeticOperator
impl Send for ArithmeticOperator
impl Sync for ArithmeticOperator
impl Unpin for ArithmeticOperator
impl UnwindSafe for ArithmeticOperator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more