pub enum MathInstruction {
PreciseSquareRoot {
radicand: u64,
},
SquareRootU64 {
radicand: u64,
},
SquareRootU128 {
radicand: u128,
},
U64Multiply {
multiplicand: u64,
multiplier: u64,
},
U64Divide {
dividend: u64,
divisor: u64,
},
F32Multiply {
multiplicand: f32,
multiplier: f32,
},
F32Divide {
dividend: f32,
divisor: f32,
},
Noop,
}
Expand description
Instructions supported by the math program, used for testing instruction counts
Variants§
PreciseSquareRoot
Calculate the square root of the given u64 with decimals
No accounts required for this instruction
SquareRootU64
Calculate the integer square root of the given u64
No accounts required for this instruction
SquareRootU128
Calculate the integer square root of the given u128
No accounts required for this instruction
U64Multiply
Multiply two u64 values
No accounts required for this instruction
U64Divide
Divide two u64 values
No accounts required for this instruction
F32Multiply
Multiply two float values
No accounts required for this instruction
F32Divide
Divide two float values
No accounts required for this instruction
Noop
Don’t do anything for comparison
No accounts required for this instruction
Trait Implementations§
Source§impl BorshDeserialize for MathInstruction
impl BorshDeserialize for MathInstruction
Source§impl BorshSerialize for MathInstruction
impl BorshSerialize for MathInstruction
Source§impl Clone for MathInstruction
impl Clone for MathInstruction
Source§fn clone(&self) -> MathInstruction
fn clone(&self) -> MathInstruction
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 MathInstruction
impl Debug for MathInstruction
Source§impl PartialEq for MathInstruction
impl PartialEq for MathInstruction
impl StructuralPartialEq for MathInstruction
Auto Trait Implementations§
impl Freeze for MathInstruction
impl RefUnwindSafe for MathInstruction
impl Send for MathInstruction
impl Sync for MathInstruction
impl Unpin for MathInstruction
impl UnwindSafe for MathInstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more