Trait malachite_base::num::arithmetic::traits::FloorSqrtAssign
source · [−]pub trait FloorSqrtAssign {
fn floor_sqrt_assign(&mut self);
}
Expand description
Replaces a number with the floor of its square root.
Required Methods
fn floor_sqrt_assign(&mut self)
Implementations on Foreign Types
sourceimpl FloorSqrtAssign for u8
impl FloorSqrtAssign for u8
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for u16
impl FloorSqrtAssign for u16
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for u32
impl FloorSqrtAssign for u32
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for u64
impl FloorSqrtAssign for u64
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for u128
impl FloorSqrtAssign for u128
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for usize
impl FloorSqrtAssign for usize
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for i8
impl FloorSqrtAssign for i8
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for i16
impl FloorSqrtAssign for i16
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for i32
impl FloorSqrtAssign for i32
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for i64
impl FloorSqrtAssign for i64
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for i128
impl FloorSqrtAssign for i128
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.
sourceimpl FloorSqrtAssign for isize
impl FloorSqrtAssign for isize
sourcefn floor_sqrt_assign(&mut self)
fn floor_sqrt_assign(&mut self)
Replaces an integer with the floor of its square root.
$x \gets \lfloor\sqrt{x}\rfloor$.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if self
is negative.
Examples
See here.