Trait ha_ndarray::Float

source ·
pub trait Float: CType<Float = Self> {
Show 15 methods // Required methods fn is_inf(self) -> bool; fn is_nan(self) -> bool; fn exp(self) -> Self; fn ln(self) -> Self; fn log(self, base: Self) -> Self; fn sin(self) -> Self; fn asin(self) -> Self; fn sinh(self) -> Self; fn cos(self) -> Self; fn acos(self) -> Self; fn cosh(self) -> Self; fn tan(self) -> Self; fn atan(self) -> Self; fn tanh(self) -> Self; fn to_f64(self) -> f64;
}
Expand description

A floating-point CType

Required Methods§

source

fn is_inf(self) -> bool

Return true if this Float is infinite (positive or negative infinity).

source

fn is_nan(self) -> bool

Return true if this Float is not a number (e.g. a float representation of 1.0 / 0.0).

source

fn exp(self) -> Self

Exponentiate this number (equivalent to consts::E.pow(self)).

source

fn ln(self) -> Self

Return the natural logarithm of this Float.

source

fn log(self, base: Self) -> Self

Calculate the logarithm of this Float w/r/t the given base.

source

fn sin(self) -> Self

Return the sine of this Float (in radians).

source

fn asin(self) -> Self

Return the arcsine of this Float (in radians).

source

fn sinh(self) -> Self

Return the hyperbolic sine of this Float (in radians).

source

fn cos(self) -> Self

Return the cosine of this Float (in radians).

source

fn acos(self) -> Self

Return the arcsine of this Float (in radians).

source

fn cosh(self) -> Self

Return the hyperbolic cosine of this Float (in radians).

source

fn tan(self) -> Self

Return the tangent of this Float (in radians).

source

fn atan(self) -> Self

Return the arctangent of this Float (in radians).

source

fn tanh(self) -> Self

Return the hyperbolic tangent of this Float (in radians).

source

fn to_f64(self) -> f64

Cast this Float to an f64.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Float for f32

source§

fn is_inf(self) -> bool

source§

fn is_nan(self) -> bool

source§

fn exp(self) -> Self

source§

fn ln(self) -> Self

source§

fn log(self, base: Self) -> Self

source§

fn sin(self) -> Self

source§

fn asin(self) -> Self

source§

fn sinh(self) -> Self

source§

fn cos(self) -> Self

source§

fn acos(self) -> Self

source§

fn cosh(self) -> Self

source§

fn tan(self) -> Self

source§

fn atan(self) -> Self

source§

fn tanh(self) -> Self

source§

fn to_f64(self) -> f64

source§

impl Float for f64

source§

fn is_inf(self) -> bool

source§

fn is_nan(self) -> bool

source§

fn exp(self) -> Self

source§

fn ln(self) -> Self

source§

fn log(self, base: Self) -> Self

source§

fn sin(self) -> Self

source§

fn asin(self) -> Self

source§

fn sinh(self) -> Self

source§

fn cos(self) -> Self

source§

fn acos(self) -> Self

source§

fn cosh(self) -> Self

source§

fn tan(self) -> Self

source§

fn atan(self) -> Self

source§

fn tanh(self) -> Self

source§

fn to_f64(self) -> f64

Implementors§