core-math-sys 1.1.0

Generate bindings to CORE-MATH
Documentation

core-math-sys

Crates.io Documentation Build status

Generated bindings to CORE-MATH

CORE-MATH is a correctly rounded mathematical library in C. Correct rounding is the theoretical accuracy and beats most old C libraries such as glibc. Meanwhile, its speed is competitive with the most popular C libraries, even faster most of the time.

This crate provides the raw bindings to the CORE-MATH library. It is recommended to use the core-math crate directly instead, which provides a safe Rusty interface.

Cargo features

The default build exposes the f32 and f64 functions and works on stable Rust (1.85+). Functions on more exotic types are opt-in because their Rust primitives are unstable and their C types need a recent compiler:

  • f16 — binary16 functions (cr_*f16, 43 functions). Requires nightly Rust for the unstable f16 primitive, and GCC 12+ or Clang 17+ (the C sources need _Float16 and __builtin_roundeven).
  • f128 — binary128 functions (cr_*q, 9 functions). Requires nightly Rust for the unstable f128 primitive, and Clang 15+ or GCC 14+ (the C sources use __builtin_addcl).