[][src]Trait mathru::elementary::Exponential

pub trait Exponential {
    fn e() -> Self;
fn exp(&self) -> Self;
fn ln(&self) -> Self; }

Exponential function and its inverse

https://en.wikipedia.org/wiki/Exponential_function

Required methods

fn e() -> Self

Euler's number

fn exp(&self) -> Self

Exponential function

fn ln(&self) -> Self

Natural logiarithm function

Loading content...

Implementations on Foreign Types

impl Exponential for f32[src]

fn e() -> Self[src]

fn exp(&self) -> Self[src]

Exponential function

fn ln(&self) -> Self[src]

Logiarithm function

impl Exponential for f64[src]

fn e() -> Self[src]

fn exp(&self) -> Self[src]

Exponential function

fn ln(&self) -> Self[src]

Logiarithm function

Loading content...

Implementors

impl<T> Exponential for Complex<T> where
    T: Real
[src]

fn e() -> Self[src]

Returns the euler number represented as a complex number

fn exp(&self) -> Self[src]

Exponential function

Example

use mathru::{elementary::Exponential, num::Complex};

let z: Complex<f64> = Complex::new(1.0, 2.0);
let a: Complex<f64> = z.exp();

fn ln(&self) -> Self[src]

Logiarithm function

Example

use mathru::{elementary::Exponential, num::Complex};

let a: Complex<f64> = Complex::new(1.0_f64, 2.0_f64);
let refer: Complex<f64> = Complex::new(5.0_f64.powf(0.5_f64).ln(), 2.0_f64.atan());

assert_eq!(refer, a.ln());
Loading content...