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