[][src]Trait mathru::elementary::Power

pub trait Power {
    fn pow(&self, exp: &Self) -> Self;
fn root(&self, root: &Self) -> Self; }

Required methods

fn pow(&self, exp: &Self) -> Self

fn root(&self, root: &Self) -> Self

Loading content...

Implementations on Foreign Types

impl Power for f32[src]

impl Power for f64[src]

Loading content...

Implementors

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

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

Power

Example

extern crate mathru;
use mathru::num::Complex;
use mathru::elementary::Power;

let a: Complex<f64> = Complex::new(1.0_f64, 2.0_f64);
let b: Complex<f64> = Complex::new(-2.0_f64, -1.0_f64);
let refer: Complex<f64> = Complex::new(-0.6006033457684014, -0.07399065302898929);

assert_eq!(refer, a.pow(&b));
Loading content...