Trait dashu_base::math::Inverse

source ·
pub trait Inverse {
    type Output;

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

Compute the multiplicative inverse (aka. reciprocal) of the number.

Examples

assert_eq!(0.1234.inv(), 8.103727714748784);
assert_eq!(f32::INFINITY.inv(), 0f32);

Required Associated Types§

Required Methods§

source

fn inv(self) -> Self::Output

Implementations on Foreign Types§

source§

impl Inverse for f64

§

type Output = f64

source§

fn inv(self) -> f64

source§

impl Inverse for &f64

§

type Output = f64

source§

fn inv(self) -> f64

source§

impl Inverse for f32

§

type Output = f32

source§

fn inv(self) -> f32

source§

impl Inverse for &f32

§

type Output = f32

source§

fn inv(self) -> f32

Implementors§