Trait num_dual::DualNum[][src]

pub trait DualNum<F>: NumOps + Signed + NumOps<F> + NumAssignOps + NumAssignOps<F> + Clone + Copy + Inv<Output = Self> + Sum + Product + FromPrimitive + From<F> + Display + Sync + Send + 'static {
    const NDERIV: usize;
Show 33 methods fn scale(&mut self, f: F);
fn re(&self) -> F;
fn recip(&self) -> Self;
fn powi(&self, n: i32) -> Self;
fn powf(&self, n: F) -> Self;
fn sqrt(&self) -> Self;
fn cbrt(&self) -> Self;
fn exp(&self) -> Self;
fn exp2(&self) -> Self;
fn exp_m1(&self) -> Self;
fn ln(&self) -> Self;
fn log(&self, base: F) -> Self;
fn log2(&self) -> Self;
fn log10(&self) -> Self;
fn ln_1p(&self) -> Self;
fn sin(&self) -> Self;
fn cos(&self) -> Self;
fn tan(&self) -> Self;
fn sin_cos(&self) -> (Self, Self);
fn asin(&self) -> Self;
fn acos(&self) -> Self;
fn atan(&self) -> Self;
fn sinh(&self) -> Self;
fn cosh(&self) -> Self;
fn tanh(&self) -> Self;
fn asinh(&self) -> Self;
fn acosh(&self) -> Self;
fn atanh(&self) -> Self;
fn sph_j0(&self) -> Self;
fn sph_j1(&self) -> Self;
fn sph_j2(&self) -> Self; fn mul_add(&self, a: Self, b: Self) -> Self { ... }
fn powd(&self, exp: Self) -> Self { ... }
}
Expand description

A generalized (hyper) dual number.

Associated Constants

Highest derivative that can be calculated with this struct

Required methods

Multiply the number with the scalar f inplace.

Real part (0th derivative) of the number

Reciprocal (inverse) of a number 1/x.

Power with integer exponent x^n

Power with real exponent x^n

Square root

Cubic root

Exponential e^x

Exponential with base 2 2^x

Exponential minus 1 e^x-1

Natural logarithm

Logarithm with arbitrary base

Logarithm with base 2

Logarithm with base 10

Logarithm on x plus one ln(1+x)

Sine

Cosine

Tangent

Calculate sine and cosine simultaneously

Arcsine

Arccosine

Arctangent

Hyperbolic sine

Hyperbolic cosine

Hyperbolic tangent

Area hyperbolic sine

Area hyperbolic cosine

Area hyperbolic tangent

0th order spherical Bessel function of the first kind

1st order spherical Bessel function of the first kind

2nd order spherical Bessel function of the first kind

Provided methods

Fused multiply-add

Power with dual exponent x^n

Implementations on Foreign Types

Implementors