This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH] Fix comment about rounding in sin/cos
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: 'GNU C Library' <libc-alpha at sourceware dot org>
- Date: Thu, 30 Jan 2020 12:53:18 +0000
- Subject: PATCH] Fix comment about rounding in sin/cos
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mF+NQQqRzSDW6VdDoLcLsAg4fgA0LsD8JEGiYC8arfw=; b=kndCafefq+5du1f+dFB90efO1ILLFhzV4HGjtYBmrwkvMzQKJDRAev4Is7EdZKuXoUJyuyhWzSuZ1Q24oSDLFEEeAiTN8w7Riq2X8hDeyB0+dNzDGJCRWu1uTb1a3zBA9rz7/GcgLPDWOQLo3xKyRq3WGERNbn0jEHSpkRoaN2SDrXVOvPa5wqJQV/5IVpy9B3R37WblhdpzgLnivBrRJ/CoQWd1nPmV0FwNX6+Zm+HiQvdM08Bzv91eZrLqHITyQ2+aayuJgyq23PlesiDqzVMOv3LuY/33KlmG3Iosdx4n2t3/iQNK8RNapDsGQVw35r1QkqVqfc0qXQMqoLXgvw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FR5xtdT9o+WnA/Un96Ss6Ja3lLQM24QxPDnfKv009fjeTnj1pPT2gCM5dSWPbkJbEt/u+h5/G26ZONL3J2v3Tm/X1Dkk8eji/8+bkaiyT1mmWDRagNzstwrncVzuOD0W/PE/nJS1Db/Egy3UCZdBTaie+OmZEqy/YOfxGZLahwsbta3zf8uC1z+GNQvWNj1SxRFiZicmCodyA5i3mV25GjymeKPfXICkO3zQpu1t0hKAgd/Gr+fheUdDe4WhPXYNWhKoIDRFYBprY3/L+BmolwxNZbBe/LalBEm2j5yzJimRzd3+YFGzDr1/JoprvLhueks4wvG8IK3wAdFmVBdVxQ==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
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