From 35d3444e2742faa3c2e805cdcbfeceaf0287eefc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 9 Aug 2017 10:09:38 -0400 Subject: more intuitive left shift and right shift operators Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413 --- std/math/expm1.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/math/expm1.zig') diff --git a/std/math/expm1.zig b/std/math/expm1.zig index 7ffc14b951..4343a92117 100644 --- a/std/math/expm1.zig +++ b/std/math/expm1.zig @@ -124,7 +124,7 @@ fn expm1_32(x_: f32) -> f32 { } } - const twopk = @bitCast(f32, u32((0x7F + k) <<% 23)); + const twopk = @bitCast(f32, u32((0x7F + k) << 23)); if (k < 0 or k > 56) { var y = x - e + 1.0; @@ -253,7 +253,7 @@ fn expm1_64(x_: f64) -> f64 { } } - const twopk = @bitCast(f64, u64(0x3FF + k) <<% 52); + const twopk = @bitCast(f64, u64(0x3FF + k) << 52); if (k < 0 or k > 56) { var y = x - e + 1.0; -- cgit v1.2.3