Skip to main content

FloorSquareRoot

Trait FloorSquareRoot 

Source
pub trait FloorSquareRoot: CheckedSquareRoot {
    // Required methods
    fn floor_sqrt(&self) -> Self::Output;
    fn floor_sqrt_vartime(&self) -> Self::Output;
}
Expand description

Support for calculating floored square roots.

Required Methods§

Source

fn floor_sqrt(&self) -> Self::Output

Computes floor(sqrt(self)).

Source

fn floor_sqrt_vartime(&self) -> Self::Output

Computes floor(sqrt(self)).

Variable time with respect to self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl FloorSquareRoot for BoxedUint

Available on crate feature alloc only.
Source§

impl FloorSquareRoot for Limb

Source§

impl<const LIMBS: usize> FloorSquareRoot for NonZero<Uint<LIMBS>>

Source§

impl<const LIMBS: usize> FloorSquareRoot for Uint<LIMBS>