3 Commits

Author SHA1 Message Date
mihael 764760df62 libzigc/math: Implement rintl, lrintl (#31791)
It's a fairly straightforward port of `musl`'s `rintl`, like `rint` and `rintf` were. `libc-test` tests for `rintl` are uncommented since they're now passing.

I've also covered special cases for `rint` with tests, and broke down the current `rint` and `modf` test declarations into multiple -- so each libc function get its own test declaration at the very least.

Contributes to #30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31791
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-27 16:48:55 +02:00
mihael 61161132b6 compiler_rt: Dissolve math_utils.zig into long_double.zig & trig.zig
The closest namespace the pi/4 constant could belong to is `trig.zig` since
it's used across trig function implementations. On the other hand, chucking
`long double` bit slicing functions into `trig.zig` seems a little more
awkward, so they're put into their own namespace.
2026-04-02 23:54:20 +02:00
mihael c76644caf3 libzigc/math: Port rem_pio2l from musl to compiler_rt
Additionally, add helper functions for fetching the sign+exponent
and top 16 bits of a f80/f128's mantissa.

We'll need these functions to implement `cosl`, `sinl`, `tanl`, and,
transitively, `sincosl`.
2026-04-02 23:54:20 +02:00