diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-29 14:10:59 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-29 14:10:59 -0700 |
| commit | de7270028d2b70ceea74c43be943b1b788c797a6 (patch) | |
| tree | 0d9b545a2a9d36c86b79178f797adf5ebcd40d17 /lib/std/math/float.zig | |
| parent | 7c9a8ecc2aca7f925e59d282540ef8e2d1ae211e (diff) | |
| parent | e69973beddcd8a42dbc7ebcfb96187e5a6f61b61 (diff) | |
| download | zig-de7270028d2b70ceea74c43be943b1b788c797a6.tar.gz zig-de7270028d2b70ceea74c43be943b1b788c797a6.zip | |
Merge remote-tracking branch 'origin/master' into llvm15
Diffstat (limited to 'lib/std/math/float.zig')
| -rw-r--r-- | lib/std/math/float.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math/float.zig b/lib/std/math/float.zig index 30e456fcbd..768cc03285 100644 --- a/lib/std/math/float.zig +++ b/lib/std/math/float.zig @@ -8,7 +8,7 @@ inline fn mantissaOne(comptime T: type) comptime_int { } /// Creates floating point type T from an unbiased exponent and raw mantissa. -inline fn reconstructFloat(comptime T: type, exponent: comptime_int, mantissa: comptime_int) T { +inline fn reconstructFloat(comptime T: type, comptime exponent: comptime_int, comptime mantissa: comptime_int) T { const TBits = @Type(.{ .Int = .{ .signedness = .unsigned, .bits = @bitSizeOf(T) } }); const biased_exponent = @as(TBits, exponent + floatExponentMax(T)); return @bitCast(T, (biased_exponent << floatMantissaBits(T)) | @as(TBits, mantissa)); |
