From ba4e688461a0e3171a6c515040ec9200319070b6 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 6 Oct 2016 00:34:26 +0530 Subject: Check n instead of k1 to decide on sign of sin/cos result For k1 in 1 and 3, n can only have values of 0 and 2, so checking k1 & 2 is equivalent to checking n & 2. We prefer the latter so that we don't use k1 for anything other than selecting the quadrant in do_sincos_1, thus dropping it completely. The previous logic was: "Compute sine for the value and based on the new rotated quadrant (k1) negate the value if we're in the fourth quadrant." With this change, the logic now is: "Compute sine for the value and negate it if we were either (1) in the fourth quadrant or (2) we actually wanted the cosine and were in the third quadrant." * sysdeps/ieee754/dbl-64/s_sin.c (do_sincos_1): Check N instead of K1. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ff38c6eb14..2495a2eb4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2016-10-05 Siddhesh Poyarekar + * sysdeps/ieee754/dbl-64/s_sin.c (do_sincos_1): Check N + instead of K1. + * sysdeps/ieee754/dbl-64/s_sin.c (do_sincos_1): Rename K to SHIFT_QUADRANT and make it bool. (do_sincos_2): Likewise. -- cgit v1.2.3