aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/complex/sinh.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-06-24 16:58:19 -0700
committerGitHub <noreply@github.com>2023-06-24 16:58:19 -0700
commit146b79af153bbd5dafda0ba12a040385c7fc58f8 (patch)
tree67e3db8b444d65c667e314770fc983a7fc8ba293 /lib/std/math/complex/sinh.zig
parent13853bef0df3c90633021850cc6d6abaeea03282 (diff)
parent21ac0beb436f49fe49c6982a872f2dc48e4bea5e (diff)
downloadzig-146b79af153bbd5dafda0ba12a040385c7fc58f8.tar.gz
zig-146b79af153bbd5dafda0ba12a040385c7fc58f8.zip
Merge pull request #16163 from mlugg/feat/builtins-infer-dest-ty
Infer destination type of cast builtins using result type
Diffstat (limited to 'lib/std/math/complex/sinh.zig')
-rw-r--r--lib/std/math/complex/sinh.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/std/math/complex/sinh.zig b/lib/std/math/complex/sinh.zig
index 9afb7faf30..c9ea0d04fc 100644
--- a/lib/std/math/complex/sinh.zig
+++ b/lib/std/math/complex/sinh.zig
@@ -26,10 +26,10 @@ fn sinh32(z: Complex(f32)) Complex(f32) {
const x = z.re;
const y = z.im;
- const hx = @bitCast(u32, x);
+ const hx = @as(u32, @bitCast(x));
const ix = hx & 0x7fffffff;
- const hy = @bitCast(u32, y);
+ const hy = @as(u32, @bitCast(y));
const iy = hy & 0x7fffffff;
if (ix < 0x7f800000 and iy < 0x7f800000) {
@@ -89,14 +89,14 @@ fn sinh64(z: Complex(f64)) Complex(f64) {
const x = z.re;
const y = z.im;
- const fx = @bitCast(u64, x);
- const hx = @intCast(u32, fx >> 32);
- const lx = @truncate(u32, fx);
+ const fx = @as(u64, @bitCast(x));
+ const hx = @as(u32, @intCast(fx >> 32));
+ const lx = @as(u32, @truncate(fx));
const ix = hx & 0x7fffffff;
- const fy = @bitCast(u64, y);
- const hy = @intCast(u32, fy >> 32);
- const ly = @truncate(u32, fy);
+ const fy = @as(u64, @bitCast(y));
+ const hy = @as(u32, @intCast(fy >> 32));
+ const ly = @as(u32, @truncate(fy));
const iy = hy & 0x7fffffff;
if (ix < 0x7ff00000 and iy < 0x7ff00000) {