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§
source§impl FloorRootAssign<u64> for u8
impl FloorRootAssign<u64> for u8
source§fn 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.
source§impl FloorRootAssign<u64> for u16
impl FloorRootAssign<u64> for u16
source§fn 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.
source§impl FloorRootAssign<u64> for u32
impl FloorRootAssign<u64> for u32
source§fn 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.
source§impl FloorRootAssign<u64> for u64
impl FloorRootAssign<u64> for u64
source§fn 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.
source§impl FloorRootAssign<u64> for u128
impl FloorRootAssign<u64> for u128
source§fn 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.
source§impl FloorRootAssign<u64> for usize
impl FloorRootAssign<u64> for usize
source§fn 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.
source§impl FloorRootAssign<u64> for i8
impl FloorRootAssign<u64> for i8
source§fn 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.
source§impl FloorRootAssign<u64> for i16
impl FloorRootAssign<u64> for i16
source§fn 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.
source§impl FloorRootAssign<u64> for i32
impl FloorRootAssign<u64> for i32
source§fn 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.
source§impl FloorRootAssign<u64> for i64
impl FloorRootAssign<u64> for i64
source§fn 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.
source§impl FloorRootAssign<u64> for i128
impl FloorRootAssign<u64> for i128
source§fn 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.
source§impl FloorRootAssign<u64> for isize
impl FloorRootAssign<u64> for isize
source§fn 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.