diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-06-22 18:46:56 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-24 16:56:39 -0700 |
| commit | f26dda21171e26f44aeec8c59a75bbb3331eeb2e (patch) | |
| tree | c935248861ae2693b314f2c8bc78fe38d9961b6d /lib/std/math/complex/sinh.zig | |
| parent | 447ca4e3fff021f471b748187b53f0a4744ad0bc (diff) | |
| download | zig-f26dda21171e26f44aeec8c59a75bbb3331eeb2e.tar.gz zig-f26dda21171e26f44aeec8c59a75bbb3331eeb2e.zip | |
all: migrate code to new cast builtin syntax
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:
* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
Diffstat (limited to 'lib/std/math/complex/sinh.zig')
| -rw-r--r-- | lib/std/math/complex/sinh.zig | 16 |
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) { |
