From f42e57077266caf6e1f4caaa8084174d1ed1b0b8 Mon Sep 17 00:00:00 2001 From: Igor null Date: Mon, 13 May 2019 12:14:03 +0300 Subject: [PATCH] rem_pio2: actually return medium value for x ~<= 5pi/4 --- src/math/rem_pio2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/rem_pio2.rs b/src/math/rem_pio2.rs index 285663e..186333e 100644 --- a/src/math/rem_pio2.rs +++ b/src/math/rem_pio2.rs @@ -85,7 +85,7 @@ pub(crate) fn rem_pio2(x: f64) -> (i32, f64, f64) { /* |x| ~<= 5pi/4 */ if (ix & 0xfffff) == 0x921fb { /* |x| ~= pi/2 or 2pi/2 */ - medium(x, ix); /* cancellation -- use medium case */ + return medium(x, ix); /* cancellation -- use medium case */ } if ix <= 0x4002d97c { /* |x| ~<= 3pi/4 */