Most of these implementations were just straightforward calling of the Zig standard library, expect for the modf libc functions.
The changes were tested at each commit, and the results are attached to the commit messages.
libc's modf behaves a bit differently from Zig's, so I had to write a little more to cover the edge cases and add tests for them. I've then generalized the solution so it could be reused for modff and modfl as well.
Contributes to #30978
Most of these implementations were just straightforward calling of the Zig standard library, expect for the `modf` libc functions.
The changes were tested at each commit, and the results are attached to the commit messages.
libc's `modf` behaves a bit differently from Zig's, so I had [to write a little more](https://codeberg.org/mihael/zig/commit/cc1217543d3d5f76105e71bd56a67921dafdd0c6) to cover the edge cases and add tests for them. I've then generalized the solution so it could be reused for [`modff`](https://codeberg.org/mihael/zig/commit/5ff144bd97078cdadf2460b44a05f549ef10f411) and [`modfl`](https://codeberg.org/mihael/zig/commit/5f57567d1f2524142a8478acb7b3eb7dbba79101) as well.
Contributes to #30978