aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/acosh.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/acosh.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/acosh.zig')
-rw-r--r--lib/std/math/acosh.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/math/acosh.zig b/lib/std/math/acosh.zig
index a78130d2ef..0c6de9933e 100644
--- a/lib/std/math/acosh.zig
+++ b/lib/std/math/acosh.zig
@@ -24,7 +24,7 @@ pub fn acosh(x: anytype) @TypeOf(x) {
// acosh(x) = log(x + sqrt(x * x - 1))
fn acosh32(x: f32) f32 {
- const u = @bitCast(u32, x);
+ const u = @as(u32, @bitCast(x));
const i = u & 0x7FFFFFFF;
// |x| < 2, invalid if x < 1 or nan
@@ -42,7 +42,7 @@ fn acosh32(x: f32) f32 {
}
fn acosh64(x: f64) f64 {
- const u = @bitCast(u64, x);
+ const u = @as(u64, @bitCast(x));
const e = (u >> 52) & 0x7FF;
// |x| < 2, invalid if x < 1 or nan