diff options
| author | viri <hi@viri.moe> | 2022-04-06 20:49:05 -0600 |
|---|---|---|
| committer | viri <hi@viri.moe> | 2022-04-07 05:04:38 -0600 |
| commit | e46c61250332e615afc5aed6e4ebe57b8e6713eb (patch) | |
| tree | 5ffbc2acac6c03becd253c7d4308eb33a4721025 /lib/std/math/complex | |
| parent | 5d6a5a123676ada3ccd229f31dc8855aabaf8057 (diff) | |
| download | zig-e46c61250332e615afc5aed6e4ebe57b8e6713eb.tar.gz zig-e46c61250332e615afc5aed6e4ebe57b8e6713eb.zip | |
use math/float.zig everywhere
Diffstat (limited to 'lib/std/math/complex')
| -rw-r--r-- | lib/std/math/complex/exp.zig | 4 | ||||
| -rw-r--r-- | lib/std/math/complex/sinh.zig | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/math/complex/exp.zig b/lib/std/math/complex/exp.zig index f2ae28d3fd..ce25025ded 100644 --- a/lib/std/math/complex/exp.zig +++ b/lib/std/math/complex/exp.zig @@ -120,7 +120,7 @@ fn exp64(z: Complex(f64)) Complex(f64) { } test "complex.cexp32" { - const tolerance_f32 = math.sqrt(math.epsilon(f32)); + const tolerance_f32 = math.sqrt(math.floatEps(f32)); { const a = Complex(f32).init(5, 3); @@ -140,7 +140,7 @@ test "complex.cexp32" { } test "complex.cexp64" { - const tolerance_f64 = math.sqrt(math.epsilon(f64)); + const tolerance_f64 = math.sqrt(math.floatEps(f64)); { const a = Complex(f64).init(5, 3); diff --git a/lib/std/math/complex/sinh.zig b/lib/std/math/complex/sinh.zig index ed344999ee..851af3e62e 100644 --- a/lib/std/math/complex/sinh.zig +++ b/lib/std/math/complex/sinh.zig @@ -79,7 +79,7 @@ fn sinh32(z: Complex(f32)) Complex(f32) { if (iy >= 0x7f800000) { return Complex(f32).init(x * x, x * (y - y)); } - return Complex(f32).init(x * math.cos(y), math.inf_f32 * math.sin(y)); + return Complex(f32).init(x * math.cos(y), math.inf(f32) * math.sin(y)); } return Complex(f32).init((x * x) * (y - y), (x + x) * (y - y)); @@ -146,7 +146,7 @@ fn sinh64(z: Complex(f64)) Complex(f64) { if (iy >= 0x7ff00000) { return Complex(f64).init(x * x, x * (y - y)); } - return Complex(f64).init(x * math.cos(y), math.inf_f64 * math.sin(y)); + return Complex(f64).init(x * math.cos(y), math.inf(f64) * math.sin(y)); } return Complex(f64).init((x * x) * (y - y), (x + x) * (y - y)); |
