Trait malachite_base::num::arithmetic::traits::CeilingRootAssign
source · [−]pub trait CeilingRootAssign<POW> {
fn ceiling_root_assign(&mut self, pow: POW);
}
Expand description
Replaces a number with the ceiling of its $n$th root.
Required Methods
fn ceiling_root_assign(&mut self, pow: POW)
Implementations on Foreign Types
sourceimpl CeilingRootAssign<u64> for u8
impl CeilingRootAssign<u64> for u8
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for u16
impl CeilingRootAssign<u64> for u16
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for u32
impl CeilingRootAssign<u64> for u32
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for u64
impl CeilingRootAssign<u64> for u64
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for u128
impl CeilingRootAssign<u64> for u128
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for usize
impl CeilingRootAssign<u64> for usize
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for i8
impl CeilingRootAssign<u64> for i8
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for i16
impl CeilingRootAssign<u64> for i16
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for i32
impl CeilingRootAssign<u64> for i32
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for i64
impl CeilingRootAssign<u64> for i64
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for i128
impl CeilingRootAssign<u64> for i128
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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 CeilingRootAssign<u64> for isize
impl CeilingRootAssign<u64> for isize
sourcefn ceiling_root_assign(&mut self, exp: u64)
fn ceiling_root_assign(&mut self, exp: u64)
Replaces an integer with the ceiling of its $n$th root.
$x \gets \lceil\sqrt[n]{x}\rceil$.
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.