about summary refs log tree commit diff
path: root/library/core/src/num/libm.rs
blob: aeabb087230955c56309dc76d0be329ba8a4238e (plain)
1
2
3
4
5
6
7
8
9
10
11
//! Bindings to math functions provided by the system `libm` or by the `libm` crate, exposed
//! via `compiler-builtins`.

// SAFETY: These symbols have standard interfaces in C and are defined by `libm`, or are
// provided by `compiler-builtins` on unsupported platforms.
unsafe extern "C" {
    pub(crate) safe fn cbrt(n: f64) -> f64;
    pub(crate) safe fn cbrtf(n: f32) -> f32;
    pub(crate) safe fn fdim(a: f64, b: f64) -> f64;
    pub(crate) safe fn fdimf(a: f32, b: f32) -> f32;
}