1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! `elem-simd-math` — vectorized elementwise math for `f64`.
//!
//! This crate is a port of [SLEEF] as expressed by the [sleef-rs] crate, rewritten against the
//! stable-Rust SIMD abstraction of [`fearless_simd`] so that it builds on stable Rust with
//! runtime CPU feature detection. See `NOTICE` and `THIRD-PARTY-LICENSES` for the provenance and
//! licensing of the derived portions.
//!
//! [SLEEF]: https://sleef.org/
//! [sleef-rs]: https://github.com/burrbull/sleef-rs
//!
//! # Layers
//!
//! * [`f64x`] exposes the ported kernels as functions generic over a
//! [`fearless_simd::Simd`] token, operating on native-width vectors. Use these when you
//! already own the SIMD loop.
//! * [`ElementwiseMath`] exposes slice entry points that pick the best available SIMD level at
//! runtime, with a scalar fallback.
//!
//! # Accuracy
//!
//! Kernels come from SLEEF's four accuracy tiers and each function documents its tier's error
//! bound (`u05` = 0.5 ULP, `u10` = 1.0 ULP, `u15` = 1.5 ULP, `u35` = 3.5 ULP). Those bounds are
//! asserted by the ported upstream test suites against MPFR. They bound the vector body; the
//! value produced for inputs outside a kernel's tested domain is documented per function.
// The ported coefficients are written out to upstream's full decimal expansion. Shortening them
// to the shortest round-tripping form would change the constants, and several are deliberately
// not the nearest `f64` to a mathematical constant (they are the range-reduction splits).
pub
pub use ;
/// The `f32` slice entry points are also available as free functions here.
/// The `f64` slice entry points are also available as free functions here.