libm
libm copied to clipboard
A port of MUSL's libm to Rust.
I'm starting here by deleting all the `force_eval` uses that are for raising floating-point exceptions. @programmerjake is interested in some breadcrumbs for the non-default rounding modes uses, so I'm going...
`assert_eq!` uses `PartialEq`, which doesn't discern between -0 and +0. `total_cmp` does distinguish them. So this patch makes the test spec-compliant
This MR is intended to be a preparation for #262. - fix all clippy warnings (or properly ignore, where sensible) - add clippy to CI - remove the `force_eval!` macro...
**Update 2023-12-18** This is still blocked by having these features not in stable. ``` #![feature(const_float_bits_conv)] #![feature(const_fn_floating_point_arithmetic)] #![feature(const_float_classify)] ``` --- This commit adds "const fn" where possible without major refactorings. All...
Currenly only the edition `2018` is specified, which implicitly sets the MSRV to `1.31.0`, but libm doesn't compile with that version. The first compatble rust version is `1.43.0`, when the...
Sorry, keyboard flaked out there, hence the open-and-close... Anyhow, was looking at some math functions like `sqrtf()` and noticed some oddness / inconsistencies that I thought was worth asking about...
Currently, `libm`'s 32-bit floating-point math functions (e.g., `sinf`, `cosf`, etc.) are ports to Rust of musl implementations. This means that many of these 32-bit functions (e.g., `sinf`) use `f64` intermediate...
I noticed there is a PR #210 that removed most `#[inline]` annotations. However, in developing one of my crates, I found that Rust's stdlib `cbrtf` was a significant bottleneck. I...
libm is derivative of musl, which is MIT licensed, so this source code should also be MIT licensed. Cargo.toml though says "MIT or Apache-2.0". As suggested by the "or", I...
The linker prints out: `undefined symbol: fmodf` and `undefined symbol: fmod`. I noticed that if I don't use any of these functions the linker error goes away. I've been trying...