about summary refs log tree commit diff
path: root/library/std/src/sys/cmath.rs
AgeCommit message (Collapse)AuthorLines
2025-05-13Initial implementation of `core_float_math`Trevor Gross-4/+0
Since [1], `compiler-builtins` makes a certain set of math symbols weakly available on all platforms. This means we can begin exposing some of the related functions in `core`, so begin this process here. It is not possible to provide inherent methods in both `core` and `std` while giving them different stability gates, so standalone functions are added instead. This provides a way to experiment with the functionality while unstable; once it is time to stabilize, they can be converted to inherent. For `f16` and `f128`, everything is unstable so we can move the inherent methods. The following are included to start: * floor * ceil * round * round_ties_even * trunc * fract * mul_add * div_euclid * rem_euclid * powi * sqrt * abs_sub * cbrt These mirror the set of functions that we have in `compiler-builtins` since [1]. Tracking issue: https://github.com/rust-lang/rust/issues/137578 [1]: https://github.com/rust-lang/compiler-builtins/pull/763
2025-03-29std: make `cmath` functions safejoboet-59/+59
2025-02-14Implement `f{16,32,64,128}::{erf,erfc}`Pavel Grigorenko-0/+6
Also add ```rust // #[unstable(feature = "float_gamma", issue = "99842")] ``` to `gamma`-function-related methods on `f16` & `f128`, as per https://github.com/rust-lang/rust/pull/136324#issuecomment-2626270247
2025-02-09Mark extern blocks as unsafeMichael Goulet-1/+1
2024-11-27fmtHenry Jiang-1/+1
2024-11-22aix: create shim for lgammaf_rHenry Jiang-1/+9
2024-08-01Add math functions for `f16` and `f128`Trevor Gross-0/+15
This adds missing functions for math operations on the new float types. Platform support is pretty spotty at this point, since even platforms with generally good support can be missing math functions. `std/build.rs` is updated to reflect this.
2024-02-07Make cmath.rs a single fileChris Denton-0/+88