public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86
@ 2012-03-15 13:46 aj at suse dot de
  2012-03-15 14:57 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanl() are " aj at suse dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 13:46 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

             Bug #: 13852
           Summary: sincosf(), sinf(), cosf() is incorrect for large
                    inputs on x86_64 and x86
           Product: glibc
           Version: 2.15
            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
    Classification: Unclassified


+++ This bug was initially created as a clone of Bug #13658 +++

sincosf() is inaccurate for large inputs on x86_64: with glibc 2.13,

#define _GNU_SOURCE
#include <stdio.h>
#include <math.h>

int main (void)
{
  volatile float x = 1.0e22;
  float s1, s2, c1;

  sincosf (x, &s1, &c1);
  s2 = sinf (x);
  printf ("s1 = %.17g\n", s1);
  printf ("s2 = %.17g\n", s2);
  return 0;
}

outputs:
s1 = 0.28122705221176147
s2 = 0.28122705221176147

Correct value:
0.85220084976718879

-- 
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/13852] sincosf(), sinf(), cosf(), tanl() are incorrect for large inputs on x86_64 and x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
@ 2012-03-15 14:57 ` aj at suse dot de
  2012-03-15 15:00 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() " aj at suse dot de
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 14:57 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sincosf(), sinf(), cosf()   |sincosf(), sinf(), cosf(),
                   |is incorrect for large      |tanl() are incorrect for
                   |inputs on x86_64 and x86    |large inputs on x86_64 and
                   |                            |x86

--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2012-03-15 14:56:58 UTC ---
This applies to sinf, cosf, tanf and sincosf.

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86_64 and x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
  2012-03-15 14:57 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanl() are " aj at suse dot de
@ 2012-03-15 15:00 ` aj at suse dot de
  2012-03-15 15:09 ` aj at suse dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sincosf(), sinf(), cosf(),  |sincosf(), sinf(), cosf(),
                   |tanl() are incorrect for    |tanf() are incorrect for
                   |large inputs on x86_64 and  |large inputs on x86_64 and
                   |x86                         |x86

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86_64 and x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
  2012-03-15 14:57 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanl() are " aj at suse dot de
  2012-03-15 15:00 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() " aj at suse dot de
@ 2012-03-15 15:09 ` aj at suse dot de
  2012-03-15 15:35 ` aj at suse dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:09 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |13854

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86_64 and x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (2 preceding siblings ...)
  2012-03-15 15:09 ` aj at suse dot de
@ 2012-03-15 15:35 ` aj at suse dot de
  2012-03-15 15:39 ` aj at suse dot de
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:35 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|13851                       |

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86_64 and x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (3 preceding siblings ...)
  2012-03-15 15:35 ` aj at suse dot de
@ 2012-03-15 15:39 ` aj at suse dot de
  2012-03-15 15:47 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86 aj at suse dot de
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:39 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|13854                       |

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (4 preceding siblings ...)
  2012-03-15 15:39 ` aj at suse dot de
@ 2012-03-15 15:47 ` aj at suse dot de
  2012-03-15 17:07 ` aj at suse dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 15:47 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sincosf(), sinf(), cosf(),  |sincosf(), sinf(), cosf(),
                   |tanf() are incorrect for    |tanf() are incorrect for
                   |large inputs on x86_64 and  |large inputs on x86
                   |x86                         |

--- Comment #2 from Andreas Jaeger <aj at suse dot de> 2012-03-15 15:47:20 UTC ---
This applies only to x86 - and better use 0x1p65 as exact input value, the
result is: 0.047236487235904796.

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (5 preceding siblings ...)
  2012-03-15 15:47 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86 aj at suse dot de
@ 2012-03-15 17:07 ` aj at suse dot de
  2013-06-03 16:05 ` carlos at redhat dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2012-03-15 17:07 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13852

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Andreas Jaeger <aj at suse dot de> 2012-03-15 17:06:13 UTC ---
Fixed in git head:
2012-03-15  Andreas Jaeger  <aj@suse.de>

    [BZ #13852]
    * sysdeps/i386/fpu/e_rem_pio2f.c: Delete so that i386 uses the
    ieee754/flt-32 implementation for sin, cos and sincos.
    * sysdeps/i386/fpu/k_rem_pio2f.c: Likewise.
    * sysdeps/i386/fpu/s_cosf.S: Likewise.
    * sysdeps/i386/fpu/s_sincosf.S: Likewise.
    * sysdeps/i386/fpu/s_sinf.S: Likewise.
    * sysdeps/i386/fpu/s_tanf.S: Delete so that i386 uses the
    ieee754/flt-32 implementation for tan.

    * math/libm-test.inc (cos_test): Enable some large input tests for
    float as well
    (sin_test): Likewise.
    (sincos_test): Likewise.
    (tan_test): Add tests for large input.

    * sysdeps/i386/fpu/libm-test-ulps: Update.

-- 
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/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (6 preceding siblings ...)
  2012-03-15 17:07 ` aj at suse dot de
@ 2013-06-03 16:05 ` carlos at redhat dot com
  2013-06-03 17:47 ` carlos at redhat dot com
  2014-06-26 13:57 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ 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=13852

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] 11+ messages in thread

* [Bug math/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (7 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:57 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ 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=13852

Bug 13852 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] 11+ messages in thread

* [Bug math/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86
  2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
                   ` (8 preceding siblings ...)
  2013-06-03 17:47 ` carlos at redhat dot com
@ 2014-06-26 13:57 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 13:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13852

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

end of thread, other threads:[~2014-06-26 13:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 13:46 [Bug math/13852] New: sincosf(), sinf(), cosf() is incorrect for large inputs on x86_64 and x86 aj at suse dot de
2012-03-15 14:57 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanl() are " aj at suse dot de
2012-03-15 15:00 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() " aj at suse dot de
2012-03-15 15:09 ` aj at suse dot de
2012-03-15 15:35 ` aj at suse dot de
2012-03-15 15:39 ` aj at suse dot de
2012-03-15 15:47 ` [Bug math/13852] sincosf(), sinf(), cosf(), tanf() are incorrect for large inputs on x86 aj at suse dot de
2012-03-15 17:07 ` aj at suse dot de
2013-06-03 16:05 ` carlos at redhat dot com
2013-06-03 17:47 ` carlos at redhat dot com
2014-06-26 13:57 ` 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).