[go: up one dir, main page]

Split

Trait Split 

Source
pub trait Split: Float {
    // Required method
    fn split_factor() -> Self;

    // Provided method
    fn split(self) -> (Self, Self) { ... }
}
Expand description

Split a floating-point number

Required Methods§

Source

fn split_factor() -> Self

Split factor used in the algorithm

Provided Methods§

Source

fn split(self) -> (Self, Self)

Split a floating-point number

Splits a number x into two parts:

x = h + t

with h and t nonoverlapping and t.abs() <= h.abs()

§References

Due to Veltkamp, published in Dekker 71

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 Split for f32

Source§

impl Split for f64

Implementors§