pub trait Elementary {
    // Required methods
    fn log1p(&self) -> Self;
    fn expm1(&self) -> Self;
    fn hypot(&self, y: f64) -> Self;
    fn hypot3(&self, y: f64, z: f64) -> Self;
    fn acosh(&self) -> Self;
    fn asinh(&self) -> Self;
    fn atanh(&self) -> Self;
    fn ldexp(&self, e: i32) -> Self;
    fn frexp(&self, e: &mut i32) -> Self;
}

Required Methods§

source

fn log1p(&self) -> Self

This function computes the value of log(1+x) in a way that is accurate for small x. It provides an alternative to the BSD math function log1p(x).

source

fn expm1(&self) -> Self

This function computes the value of exp(x)-1 in a way that is accurate for small x. It provides an alternative to the BSD math function expm1(x).

source

fn hypot(&self, y: f64) -> Self

This function computes the value of sqrt{x^2 + y^2} in a way that avoids overflow. It provides an alternative to the BSD math function hypot(x,y).

source

fn hypot3(&self, y: f64, z: f64) -> Self

This function computes the value of sqrt{x^2 + y^2 + z^2} in a way that avoids overflow.

source

fn acosh(&self) -> Self

This function computes the value of arccosh(x). It provides an alternative to the standard math function acosh(x).

source

fn asinh(&self) -> Self

This function computes the value of arcsinh(x). It provides an alternative to the standard math function asinh(x).

source

fn atanh(&self) -> Self

This function computes the value of arctanh(x). It provides an alternative to the standard math function atanh(x).

source

fn ldexp(&self, e: i32) -> Self

This function computes the value of x * 2^e. It provides an alternative to the standard math function ldexp(x,e).

source

fn frexp(&self, e: &mut i32) -> Self

This function splits the number x into its normalized fraction f and exponent e, such that x = f * 2^e and 0.5 <= f < 1. The function returns f and stores the exponent in e. If x is zero, both f and e are set to zero. This function provides an alternative to the standard math function frexp(x, e).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Elementary for f64

source§

fn log1p(&self) -> f64

source§

fn expm1(&self) -> f64

source§

fn hypot(&self, y: f64) -> f64

source§

fn hypot3(&self, y: f64, z: f64) -> f64

source§

fn acosh(&self) -> f64

source§

fn asinh(&self) -> f64

source§

fn atanh(&self) -> f64

source§

fn ldexp(&self, e: i32) -> f64

source§

fn frexp(&self, e: &mut i32) -> f64

Implementors§