public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86
@ 2012-03-15 15:14 aj at suse dot de
2012-03-15 15:38 ` [Bug math/13854] " aj at suse dot de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:14 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13854
Bug #: 13854
Summary: tan() is incorrect for large inputs on x86_64 and x86
Product: glibc
Version: 2.13
Status: NEW
Keywords: glibc_2.15
Severity: normal
Priority: P2
Component: math
AssignedTo: unassigned@sourceware.org
ReportedBy: aj@suse.de
CC: aj@suse.de, bugdal@aerifal.cx,
carlos@systemhalted.org, ppluzhnikov@google.com,
vincent-srcware@vinc17.net
Depends on: 13658
Blocks: 13851, 13852
Classification: Unclassified
+++ This bug was initially created as a clone of Bug #13658 +++
tan is inaccurate, see bug #13658 for a reference.
Test program:
#define _GNU_SOURCE
#include <stdio.h>
#include <math.h>
int main (void)
{
volatile float xf = 1e22;
float s1f, s2f;
volatile double xd = 1e22;
double s1d, s2d;
volatile long double xl = 1e22;
long double s1l, s2l;
s1d = tan (xd);
printf ("double: \n");
printf ("x = %.17g\n", xd);
printf ("s1 = %.17g\n", s1d);
s1f = tanf (xf);
printf ("\nfloat: \n");
printf ("x = %.17g\n", xf);
printf ("s1 = %.17g\n", s1f);
s1l = tanl (xl);
printf ("\nlong double: \n");
printf ("x = %.17Lg\n", xl);
printf ("s1 = %.17Lg\n", s1l);
return 0;
}
On x86-64:
double:
x = 1e+22
s1 = -1.6287782256068988
float:
x = 9.9999997781963084e+21
s1 = -1.0810239315032959
long double:
x = 1e+22
s1 = -0.52180662513577755
And on x86:
double:
x = 1e+22
s1 = -0.52180662513577758
float:
x = 9.9999997781963084e+21
s1 = -0.29305437207221985
long double:
x = 1e+22
s1 = -0.52180662513577755
The correct result of tan (1e22) is:
s1 = -1.6287782256068988
--
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] 6+ messages in thread
* [Bug math/13854] tan() is incorrect for large inputs on x86_64 and x86
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
@ 2012-03-15 15:38 ` aj at suse dot de
2012-03-16 20:13 ` jsm28 at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:38 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13854
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks|13851, 13852 |
--
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] 6+ messages in thread
* [Bug math/13854] tan() is incorrect for large inputs on x86_64 and x86
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
2012-03-15 15:38 ` [Bug math/13854] " aj at suse dot de
@ 2012-03-16 20:13 ` jsm28 at gcc dot gnu.org
2013-06-03 16:05 ` carlos at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-03-16 20:13 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13854
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-03-16 20:11:02 UTC ---
Fixed by:
commit 11b90b9f504df5b2da91ce3a06c1657d99e4a95f
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Mar 16 20:05:04 2012 +0000
Fix tan, tanl for large inputs.
--
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] 6+ messages in thread
* [Bug math/13854] tan() is incorrect for large inputs on x86_64 and x86
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
2012-03-15 15:38 ` [Bug math/13854] " aj at suse dot de
2012-03-16 20:13 ` jsm28 at gcc dot gnu.org
@ 2013-06-03 16:05 ` carlos at redhat dot com
2013-06-03 17:47 ` carlos at redhat dot com
2014-06-26 13:52 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: carlos at redhat dot com @ 2013-06-03 16:05 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13854
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |15563
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug math/13854] tan() is incorrect for large inputs on x86_64 and x86
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
` (2 preceding siblings ...)
2013-06-03 16:05 ` carlos at redhat dot com
@ 2013-06-03 17:47 ` carlos at redhat dot com
2014-06-26 13:52 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: carlos at redhat dot com @ 2013-06-03 17:47 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13854
Bug 13854 depends on bug 15563, which changed state.
Bug 15563 Summary: sincos() is incorrect for long double and large inputs on x86_64
http://sourceware.org/bugzilla/show_bug.cgi?id=15563
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug math/13854] tan() is incorrect for large inputs on x86_64 and x86
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
` (3 preceding siblings ...)
2013-06-03 17:47 ` carlos at redhat dot com
@ 2014-06-26 13:52 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 13:52 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13854
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] 6+ messages in thread
end of thread, other threads:[~2014-06-26 13:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 15:14 [Bug math/13854] New: tan() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
2012-03-15 15:38 ` [Bug math/13854] " aj at suse dot de
2012-03-16 20:13 ` jsm28 at gcc dot gnu.org
2013-06-03 16:05 ` carlos at redhat dot com
2013-06-03 17:47 ` carlos at redhat dot com
2014-06-26 13:52 ` 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).