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

#313 in Hardware support

Download history 70/week @ 2024-10-13 94/week @ 2024-10-20 83/week @ 2024-10-27 27/week @ 2024-11-03 13/week @ 2024-11-10 10/week @ 2024-11-17 20/week @ 2024-11-24 85/week @ 2024-12-01 57/week @ 2024-12-08 45/week @ 2024-12-15 5/week @ 2024-12-22 20/week @ 2024-12-29 39/week @ 2025-01-05 11/week @ 2025-01-12 26/week @ 2025-01-19 39/week @ 2025-01-26

115 downloads per month
Used in 12 crates (3 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