Skip to main content

Real

Trait Real 

Source
pub trait Real:
    Float
    + Send
    + Sync
    + Debug
    + 'static {
    // Required methods
    fn of(x: f64) -> Self;
    fn wide(self) -> f64;
}
Expand description

The real type of a state on the CPU: f64, or f32 for half the memory traffic and twice the SIMD width, at about 10⁻⁷ of relative error per step (see crate::gpu for checked runs in reduced precision).

Required Methods§

Source

fn of(x: f64) -> Self

x in this type: rounded to f32, unchanged for f64.

Source

fn wide(self) -> f64

The value in f64 (exact).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Real for f32

Source§

fn of(x: f64) -> Self

Source§

fn wide(self) -> f64

Source§

impl Real for f64

Source§

fn of(x: f64) -> Self

Source§

fn wide(self) -> f64

Implementors§