Trait dashu_int::ops::CubicRoot

source ·
pub trait CubicRoot {
    type Output;

    // Required method
    fn cbrt(&self) -> Self::Output;
}
Expand description

Compute the cubic root of the number.

The result should be rounded towards zero by default.

Examples

assert_eq!(216u32.cbrt(), 6);
assert_eq!(217u32.cbrt(), 6);

Required Associated Types§

Required Methods§

source

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

Implementations on Foreign Types§

source§

impl CubicRoot for u64

§

type Output = u32

source§

fn cbrt(&self) -> u32

source§

impl CubicRoot for u8

§

type Output = u8

source§

fn cbrt(&self) -> <u8 as CubicRoot>::Output

source§

impl CubicRoot for u16

§

type Output = u8

source§

fn cbrt(&self) -> u8

source§

impl CubicRoot for u128

§

type Output = u64

source§

fn cbrt(&self) -> u64

source§

impl CubicRoot for u32

§

type Output = u16

source§

fn cbrt(&self) -> u16

Implementors§