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/log1p.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/math/log1p.zig') diff --git a/std/math/log1p.zig b/std/math/log1p.zig index 6b8f9ba27d..a49b78d0aa 100644 --- a/std/math/log1p.zig +++ b/std/math/log1p.zig @@ -49,7 +49,7 @@ fn log1p_32(x: f32) -> f32 { } } // |x| < 2^(-24) - if ((ix <<% 1) < (0x33800000 << 1)) { + if ((ix << 1) < (0x33800000 << 1)) { // underflow if subnormal if (ix & 0x7F800000 == 0) { math.forceEval(x * x); @@ -128,7 +128,7 @@ fn log1p_64(x: f64) -> f64 { } } // |x| < 2^(-53) - if ((hx <<% 1) < (0x3CA00000 << 1)) { + if ((hx << 1) < (0x3CA00000 << 1)) { if ((hx & 0x7FF00000) == 0) { math.raiseUnderflow(); } -- cgit v1.2.3