about summary refs log tree commit diff
path: root/library/compiler-builtins/libm/src/math/generic
AgeCommit message (Collapse)AuthorLines
2025-06-13fmaximum,fminimum: Fix incorrect result and add testsTrevor Gross-24/+26
After adding tests, the current implementation for fminimum fails when provided a negative zero and NaN as inputs: ---- math::fminimum_fmaximum_num::tests::fmaximum_num_spec_tests_f64 stdout ---- thread 'math::fminimum_fmaximum_num::tests::fmaximum_num_spec_tests_f64' panicked at libm/src/math/fminimum_fmaximum_num.rs:240:13: fmaximum_num(-0x0p+0, NaN) l: NaN (0x7ff8000000000000) r: -0.0 (0x8000000000000000) ---- math::fminimum_fmaximum_num::tests::fmaximum_num_spec_tests_f32 stdout ---- thread 'math::fminimum_fmaximum_num::tests::fmaximum_num_spec_tests_f32' panicked at libm/src/math/fminimum_fmaximum_num.rs:240:13: fmaximum_num(-0x0p+0, NaN) l: NaN (0x7fc00000) r: -0.0 (0x80000000) Add more thorough spec tests for these functions and correct the implementations. Canonicalization is also moved to a trait method to centralize documentation about what it does and doesn't do.
2025-06-02cleanup: Use `x.biteq(y)` rather than `x.to_bits() == y.to_bits()`Trevor Gross-14/+12
2025-05-05Replace `super::super` with `crate::support` where possibleTrevor Gross-22/+19
Since `crate::support` now works in both `compiler-builtins` and `libm`, we can get rid of some of these unusual paths.
2025-04-29Refactor the fma modulesTrevor Gross-170/+11
Move implementations to `generic/` like the other functions. This also allows us to combine the `fma` and `fma_wide` modules.
2025-04-29Move `fma` implementations to `mod generic`Trevor Gross-0/+514
This will not build correctly, the move is done as a separate step from the rest of refactoring so git's history is cleaner.
2025-04-22Reimplement the generic fmodquaternic-66/+50
2025-04-19Run `cargo fmt` on all projectsTrevor Gross-7/+46
Apply the same formatting rules to both `libm` and `compiler-builtins`.
2025-04-19libm: Flatten the `libm/libm` directoryTrevor Gross-0/+1623