libzigc: Implement tanh

The changes were tested by running following commands:

```
$ ./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=tanh -fqemu -fwasmtime --summary line
Build Summary: 1289/1289 steps succeeded
```
This commit is contained in:
mihael
2026-03-15 23:13:24 +01:00
parent 4cad6f5372
commit fd680ba5fb
4 changed files with 5 additions and 47 deletions
+5
View File
@@ -63,6 +63,7 @@ comptime {
symbol(&pow, "pow");
symbol(&pow10, "pow10");
symbol(&pow10f, "pow10f");
symbol(&tanh, "tanh");
}
if (builtin.target.isMuslLibC()) {
@@ -338,3 +339,7 @@ test "rint" {
try expectEqual(@as(f64, 2.0), rint(2.5));
try expectEqual(@as(f64, 4.0), rint(3.5));
}
fn tanh(x: f64) callconv(.c) f64 {
return math.tanh(x);
}