Skip to main content

PowfBackend

Trait PowfBackend 

Source
pub(crate) trait PowfBackend {
    const HAS_FMA: bool;
    const ERR: u64;

    // Required methods
    fn fmaf(&self, x: f32, y: f32, z: f32) -> f32;
    fn fma(&self, x: f64, y: f64, z: f64) -> f64;
    fn polyeval3(&self, x: f64, a0: f64, a1: f64, a2: f64) -> f64;
    fn integerf(&self, x: f32) -> bool;
    fn odd_integerf(&self, x: f32) -> bool;
    fn round(&self, x: f64) -> f64;
    fn quick_mult(&self, x: DoubleDouble, y: DoubleDouble) -> DoubleDouble;
    fn quick_mult_f64(&self, x: DoubleDouble, y: f64) -> DoubleDouble;
    fn dd_polyeval6(
        &self,
        x: DoubleDouble,
        a0: DoubleDouble,
        a1: DoubleDouble,
        a2: DoubleDouble,
        a3: DoubleDouble,
        a4: DoubleDouble,
        a5: DoubleDouble,
    ) -> DoubleDouble;
    fn dd_polyeval10(
        &self,
        x: DoubleDouble,
        a0: DoubleDouble,
        a1: DoubleDouble,
        a2: DoubleDouble,
        a3: DoubleDouble,
        a4: DoubleDouble,
        a5: DoubleDouble,
        a6: DoubleDouble,
        a7: DoubleDouble,
        a8: DoubleDouble,
        a9: DoubleDouble,
    ) -> DoubleDouble;
}

Required Associated Constants§

Required Methods§

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.

Implementors§

Source§

impl PowfBackend for FmaPowfBackend

Available on x86 or x86-64 only.
Source§

const HAS_FMA: bool = true

Source§

const ERR: u64 = 64

Source§

impl PowfBackend for GenPowfBackend

Source§

const HAS_FMA: bool = false

Source§

const ERR: u64 = 128