[go: up one dir, main page]

TwoSum

Trait TwoSum 

Source
pub trait TwoSum<F>: Clone {
    // Required method
    fn two_sum(a: F, b: F) -> (F, F);
}
Expand description

Error-free transformations of two term sums

Required Methods§

Source

fn two_sum(a: F, b: F) -> (F, F)

Sum transformation

Transforms a sum a + b into the pair (x, y) where

x = fl(a + b)

is the sum of a and b with floating point rounding applied and

y = a + b - x

is the remainder of the addition.

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<F> TwoSum<F> for Dekker
where F: Float,

Source§

impl<F> TwoSum<F> for Knuth
where F: Float,

Source§

impl<F> TwoSum<F> for Neumaier
where F: Float,