Trait Pow

Source
pub trait Pow {
    // Required methods
    fn pow_int(&self, n: i32) -> Self;
    fn pow_uint(&self, n: u32) -> Self;
    fn pow_2(&self) -> Self;
    fn pow_3(&self) -> Self;
    fn pow_4(&self) -> Self;
    fn pow_5(&self) -> Self;
    fn pow_6(&self) -> Self;
    fn pow_7(&self) -> Self;
    fn pow_8(&self) -> Self;
    fn pow_9(&self) -> Self;
}

Required Methods§

Source

fn pow_int(&self, n: i32) -> Self

This routine computes the power x^n for integer n. The power is computed efficiently—for example, x^8 is computed as ((x^2)^2)^2, requiring only 3 multiplications. A version of this function which also computes the numerical error in the result is available as gsl_sf_pow_int_e.

Source

fn pow_uint(&self, n: u32) -> Self

This routine computes the power x^n for integer n. The power is computed efficiently—for example, x^8 is computed as ((x^2)^2)^2, requiring only 3 multiplications. A version of this function which also computes the numerical error in the result is available as gsl_sf_pow_int_e.

Source

fn pow_2(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_3(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_4(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_5(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_6(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_7(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_8(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Source

fn pow_9(&self) -> Self

This function can be used to compute small integer powers x^2, x^3, etc. efficiently.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Pow for f64

Source§

fn pow_int(&self, n: i32) -> f64

Source§

fn pow_uint(&self, n: u32) -> f64

Source§

fn pow_2(&self) -> f64

Source§

fn pow_3(&self) -> f64

Source§

fn pow_4(&self) -> f64

Source§

fn pow_5(&self) -> f64

Source§

fn pow_6(&self) -> f64

Source§

fn pow_7(&self) -> f64

Source§

fn pow_8(&self) -> f64

Source§

fn pow_9(&self) -> f64

Implementors§