5 unstable releases

0.3.2 Jan 24, 2024
0.3.1 Jan 1, 2024
0.3.0 Aug 11, 2022
0.2.0 Aug 8, 2022
0.1.0 Aug 5, 2022

#577 in Hardware support

Download history 70/week @ 2024-06-16 58/week @ 2024-06-23 10/week @ 2024-06-30 51/week @ 2024-07-07 47/week @ 2024-07-14 24/week @ 2024-07-21 21/week @ 2024-07-28 19/week @ 2024-08-04 13/week @ 2024-08-11 27/week @ 2024-08-18 38/week @ 2024-08-25 34/week @ 2024-09-01 149/week @ 2024-09-08 133/week @ 2024-09-15 74/week @ 2024-09-22 91/week @ 2024-09-29

448 downloads per month
Used in 8 crates (2 directly)

MIT/Apache

735KB
18K SLoC

crates.io crates.io Released API docs CI

sleef-rs

Rust port of Sleef math library based on Portable SIMD Vectors a.k.a. core::simd

Usage

Requires nightly feature portable_simd.

You can call math functions directly:

#![feature(portable_simd)]

use core::simd::f64x2;

fn main() {
    let input = f64x2::from_array([1.43, 0.57]);
    let output = sleef::f64x::sin_u10(input);
    println!("sin(α) = {:?}", output);
}

or use Sleef trait:

#![feature(portable_simd)]

use core::simd::f64x2;
use sleef::Sleef;

fn main() {
    let input = f64x2::from_array([1.43, 0.57]);
    let output = input.sin();
    println!("sin(α) = {:?}", output);
}

Dependencies