#simd #libm #math

nightly sleef

Math functions for SIMD vectors

6 releases

Uses new Rust 2024

0.3.3 Feb 21, 2026
0.3.2 Jan 24, 2024
0.3.0 Aug 11, 2022
0.2.0 Aug 8, 2022
0.1.0 Aug 5, 2022

#436 in Hardware support

Download history 65/week @ 2026-01-17 54/week @ 2026-01-24 194/week @ 2026-01-31 16/week @ 2026-02-07 20/week @ 2026-02-14 32/week @ 2026-02-21 25/week @ 2026-02-28 121/week @ 2026-03-07 795/week @ 2026-03-14 718/week @ 2026-03-21 448/week @ 2026-03-28 456/week @ 2026-04-04 622/week @ 2026-04-11 597/week @ 2026-04-18 336/week @ 2026-04-25 411/week @ 2026-05-02

2,048 downloads per month
Used in 12 crates (3 directly)

MIT/Apache

725KB
17K 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