mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user