Skip to main content

Native

Trait Native 

Source
pub trait Native:
    Float<Working = Self>
    + Core
    + Folds {
    // Required methods
    fn algebraic_add(self, other: Self) -> Self;
    fn algebraic_mul(self, other: Self) -> Self;
}
Expand description

A float type that rustymath’s algorithms run in: f32 or f64.

Required Methods§

Source

fn algebraic_add(self, other: Self) -> Self

+ that may be reordered with other algebraic operations. A sum of them vectorizes.

Source

fn algebraic_mul(self, other: Self) -> Self

× that may be reordered with other algebraic operations.

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

Source§

fn algebraic_add(self, other: f32) -> f32

Source§

fn algebraic_mul(self, other: f32) -> f32

Source§

impl Native for f64

Source§

fn algebraic_add(self, other: f64) -> f64

Source§

fn algebraic_mul(self, other: f64) -> f64

Implementors§