Trait dashu::base::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 &f32

§

type Output = f32

source§

fn inv(self) -> f32

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 f64

§

type Output = f64

source§

fn inv(self) -> f64

Implementors§

source§

impl Inverse for &RBig

§

type Output = RBig

source§

impl Inverse for &Relaxed

source§

impl Inverse for RBig

§

type Output = RBig

source§

impl Inverse for Relaxed

source§

impl<R, const B: u64> Inverse for &FBig<R, B>
where R: Round,

§

type Output = FBig<R, B>

source§

impl<R, const B: u64> Inverse for FBig<R, B>
where R: Round,

§

type Output = FBig<R, B>