This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH] Fix comment about rounding in sin/cos


Hi,

As reported in https://www.sourceware.org/ml/libc-alpha/2020-01/msg00629.html
the sin/cos functions don't support correct rounding, but still have an old comment
claiming so. Hence:

Remove a comment claiming that sin/cos round correctly.
--

diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index 97bb5cba2ff97ebd83d4b54b038e175820908ab9..64f81912a125e6382061d0853a8e1b12109128ff 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -192,8 +192,8 @@ do_sincos (double a, double da, int4 n)
 
 
 /*******************************************************************/
-/* An ultimate sin routine. Given an IEEE double machine number x   */
-/* it computes the correctly rounded (to nearest) value of sin(x)  */
+/* An ultimate sin routine. Given an IEEE double machine number x  */
+/* it computes the rounded value of sin(x).			   */
 /*******************************************************************/
 #ifndef IN_SINCOS
 double
@@ -256,8 +256,8 @@ __sin (double x)
 
 
 /*******************************************************************/
-/* An ultimate cos routine. Given an IEEE double machine number x   */
-/* it computes the correctly rounded (to nearest) value of cos(x)  */
+/* An ultimate cos routine. Given an IEEE double machine number x  */
+/* it computes the rounded value of cos(x).			   */
 /*******************************************************************/
 
 double


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]