[][src]Trait fixed_exp::FixedPowF

pub trait FixedPowF: Fixed {
    fn powf(self, n: Self) -> Self;
}

Extension trait providing fixed-point exponentiation for fixed-point numbers.

This is only implemented for types that can represent numbers larger than 1.

Required methods

fn powf(self, n: Self) -> Self

Raises a number to a fixed-point power.

Panics

  • If self is negative and n is fractional.

Examples

use fixed::types::I32F32;
use fixed_exp::FixedPowF;

let x = I32F32::from_num(4.0);
assert_eq!(I32F32::from_num(8.0), x.powf(I32F32::from_num(1.5)));
Loading content...

Implementations on Foreign Types

impl<Frac> FixedPowF for FixedI8<Frac> where
    Frac: LeEqU8 + IsLessOrEqual<U6, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedI16<Frac> where
    Frac: LeEqU16 + IsLessOrEqual<U14, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedI32<Frac> where
    Frac: LeEqU32 + IsLessOrEqual<U30, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedI64<Frac> where
    Frac: LeEqU64 + IsLessOrEqual<U62, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedI128<Frac> where
    Frac: LeEqU128 + IsLessOrEqual<U126, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedU8<Frac> where
    Frac: LeEqU8 + IsLessOrEqual<U7, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedU16<Frac> where
    Frac: LeEqU16 + IsLessOrEqual<U15, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedU32<Frac> where
    Frac: LeEqU32 + IsLessOrEqual<U31, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedU64<Frac> where
    Frac: LeEqU64 + IsLessOrEqual<U63, Output = True>, 
[src]

impl<Frac> FixedPowF for FixedU128<Frac> where
    Frac: LeEqU128 + IsLessOrEqual<U127, Output = True>, 
[src]

Loading content...

Implementors

Loading content...