Reimplements cosh and coshf in libzigc, the implementation basically calls Zig std's implementation in both cases. The changes were tested at each commit, with standard:
$ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib
$ stage4/bin/zig build test-libc -Dlibc-test-path=<LIBC-TEST-PATH> -Dtest-filter=<FUNCTION-NAME> -fqemu -fwasmtime --summary line
I've included the results for each function in their respective commits.
Contributes to #30978
It may seem a bit nitpicky, but I noticed the functions aren't alphabetically ordered in libzigc/math.zig, yet it would make it easier to visually scan them if they were. I took the liberty of sorting them alphabetically in this commit, but I'll yank it if the change is unwelcome.
I think the libzigc/math.zig file could be broken into a function-per-file collection like it's the case for the math module of other libc implementations (musl, mingw). Even though a lot of these math functions will be straightforward calling of the Zig standard library, it might get unwieldy as more come in. I see a similar approach is already being taken with libzigc/sys module.
If it sounds good, I'd try tackling it on another PR.
Reimplements `cosh` and `coshf` in `libzigc`, the implementation basically calls Zig std's implementation in both cases. The changes were tested at each commit, with standard:
```
$ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib
$ stage4/bin/zig build test-libc -Dlibc-test-path=<LIBC-TEST-PATH> -Dtest-filter=<FUNCTION-NAME> -fqemu -fwasmtime --summary line
```
I've included the results for each function in their respective commits.
Contributes to #30978
<hr>
It may seem a bit nitpicky, but I noticed the functions aren't alphabetically ordered in [`libzigc/math.zig`](https://codeberg.org/ziglang/zig/src/commit/3b515fbede945a2927d5aba59212553a8b26b944/lib/c/math.zig), yet it would make it easier to visually scan them if they were. I took the liberty of sorting them alphabetically in [this commit](https://codeberg.org/mihael/zig/commit/4a0be5613b865c345e2b9daade65ee6fbb139e39), but I'll yank it if the change is unwelcome.
I think the `libzigc/math.zig` file could be broken into a function-per-file collection like it's the case for the `math` module of other libc implementations ([musl](https://codeberg.org/ziglang/zig/src/commit/3b515fbede945a2927d5aba59212553a8b26b944/lib/libc/musl/src/math), [mingw](https://codeberg.org/ziglang/zig/src/commit/3b515fbede945a2927d5aba59212553a8b26b944/lib/libc/mingw/math)). Even though a lot of these math functions will be straightforward calling of the Zig standard library, it might get unwieldy as more come in. I see a similar approach is already being taken with [libzigc/sys module](https://codeberg.org/ziglang/zig/src/commit/3b515fbede945a2927d5aba59212553a8b26b944/lib/c/sys).
If it sounds good, I'd try tackling it on another PR.