public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/10709] New: sin() returns incorrect rounding
@ 2009-09-30 12:51 zimmerma+gcc at loria dot fr
2009-09-30 12:58 ` [Bug math/10709] " zimmerma+gcc at loria dot fr
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2009-09-30 12:51 UTC (permalink / raw)
To: glibc-bugs
for the double precision number closest to 2.522464e-1, the glibc sin() function
returns 2.4957989804940914e-01 (when printed to 17 digits, which identifies
uniquely double-precision numbers), whereas the correct rounding to nearest is
2.4957989804940911e-01.
According to glibc/sysdeps/ieee754/dbl-64/s_sin.c, the result should be
always correctly rounded.
--
Summary: sin() returns incorrect rounding
Product: glibc
Version: 2.10
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: zimmerma+gcc at loria dot fr
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-redhat-linux
GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
2009-09-30 12:51 [Bug math/10709] New: sin() returns incorrect rounding zimmerma+gcc at loria dot fr
@ 2009-09-30 12:58 ` zimmerma+gcc at loria dot fr
2009-09-30 13:07 ` zimmerma+gcc at loria dot fr
2010-03-21 22:20 ` vincent+libc at vinc17 dot org
2 siblings, 0 replies; 11+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2009-09-30 12:58 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From zimmerma+gcc at loria dot fr 2009-09-30 12:57 -------
Created an attachment (id=4236)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4236&action=view)
test case
compile with -fno-builtin to ensure the sin() call is not folded at
compile-time
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
2009-09-30 12:51 [Bug math/10709] New: sin() returns incorrect rounding zimmerma+gcc at loria dot fr
2009-09-30 12:58 ` [Bug math/10709] " zimmerma+gcc at loria dot fr
@ 2009-09-30 13:07 ` zimmerma+gcc at loria dot fr
2010-03-21 22:20 ` vincent+libc at vinc17 dot org
2 siblings, 0 replies; 11+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2009-09-30 13:07 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From zimmerma+gcc at loria dot fr 2009-09-30 13:07 -------
This bug is analyzed and a fix is proposed at
<http://www.loria.fr/~zimmerma/papers/bug10709.pdf>.
In short, it suffices to replace the line:
return (res==res+1.025*cor)? res : slow1(x);
in file glibc/sysdeps/ieee754/dbl-64/s_sin.c by:
return (res==res+1.096*cor)? res : slow1(x);
Paul Zimmermann
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
2009-09-30 12:51 [Bug math/10709] New: sin() returns incorrect rounding zimmerma+gcc at loria dot fr
2009-09-30 12:58 ` [Bug math/10709] " zimmerma+gcc at loria dot fr
2009-09-30 13:07 ` zimmerma+gcc at loria dot fr
@ 2010-03-21 22:20 ` vincent+libc at vinc17 dot org
2 siblings, 0 replies; 11+ messages in thread
From: vincent+libc at vinc17 dot org @ 2010-03-21 22:20 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincent+libc at vinc17 dot
| |org
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
` (5 preceding siblings ...)
2011-10-29 18:10 ` drepper.fsp at gmail dot com
@ 2014-07-01 6:45 ` fweimer at redhat dot com
6 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01 6:45 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=10709
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2011-07-21 7:19 ` aj at suse dot de
@ 2011-10-29 18:10 ` drepper.fsp at gmail dot com
2014-07-01 6:45 ` fweimer at redhat dot com
6 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-10-29 18:10 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-10-29 18:09:53 UTC ---
I checked in the patch.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2011-07-21 7:18 ` aj at suse dot de
@ 2011-07-21 7:19 ` aj at suse dot de
2011-10-29 18:10 ` drepper.fsp at gmail dot com
2014-07-01 6:45 ` fweimer at redhat dot com
6 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2011-07-21 7:19 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |aj at suse dot de
--- Comment #7 from Andreas Jaeger <aj at suse dot de> 2011-07-21 07:18:20 UTC ---
I send the wrong patch to the mailing list, have attached now the proper one.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2011-07-20 20:51 ` zimmerma+gcc at loria dot fr
@ 2011-07-21 7:18 ` aj at suse dot de
2011-07-21 7:19 ` aj at suse dot de
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2011-07-21 7:18 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
--- Comment #6 from Andreas Jaeger <aj at suse dot de> 2011-07-21 07:17:30 UTC ---
Created attachment 5854
--> http://sourceware.org/bugzilla/attachment.cgi?id=5854
Patch for sine
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
2011-07-12 14:19 ` aj at suse dot de
2011-07-20 20:09 ` drepper.fsp at gmail dot com
@ 2011-07-20 20:51 ` zimmerma+gcc at loria dot fr
2011-07-21 7:18 ` aj at suse dot de
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2011-07-20 20:51 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
--- Comment #5 from Paul Zimmermann <zimmerma+gcc at loria dot fr> 2011-07-20 20:48:04 UTC ---
(In reply to comment #4)
>
> Second, on what basis is this magic new factor chosen?
see the pdf at comment #2.
Paul Zimmermann
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
2011-07-12 14:19 ` aj at suse dot de
@ 2011-07-20 20:09 ` drepper.fsp at gmail dot com
2011-07-20 20:51 ` zimmerma+gcc at loria dot fr
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-07-20 20:09 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #4 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-07-20 20:09:05 UTC ---
(In reply to comment #3)
> Patch:
> http://sourceware.org/ml/libc-alpha/2011-07/msg00030.html
First, the patch contains unrelated changes.
Second, on what basis is this magic new factor chosen? If this is just
empirical, why should I trust that value?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug math/10709] sin() returns incorrect rounding
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
@ 2011-07-12 14:19 ` aj at suse dot de
2011-07-20 20:09 ` drepper.fsp at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2011-07-12 14:19 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10709
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|aj at suse dot de |drepper.fsp at gmail dot
| |com
--- Comment #3 from Andreas Jaeger <aj at suse dot de> 2011-07-12 14:18:33 UTC ---
Patch:
http://sourceware.org/ml/libc-alpha/2011-07/msg00030.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-07-01 6:45 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-30 12:51 [Bug math/10709] New: sin() returns incorrect rounding zimmerma+gcc at loria dot fr
2009-09-30 12:58 ` [Bug math/10709] " zimmerma+gcc at loria dot fr
2009-09-30 13:07 ` zimmerma+gcc at loria dot fr
2010-03-21 22:20 ` vincent+libc at vinc17 dot org
[not found] <bug-10709-131@http.sourceware.org/bugzilla/>
2011-07-12 14:19 ` aj at suse dot de
2011-07-20 20:09 ` drepper.fsp at gmail dot com
2011-07-20 20:51 ` zimmerma+gcc at loria dot fr
2011-07-21 7:18 ` aj at suse dot de
2011-07-21 7:19 ` aj at suse dot de
2011-10-29 18:10 ` drepper.fsp at gmail dot com
2014-07-01 6:45 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).