public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf)
@ 2012-06-22 20:40 jsm28 at gcc dot gnu.org
  2012-06-25 10:39 ` [Bug math/14283] " liubov.dmitrieva at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-06-22 20:40 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 14283
           Summary: Inaccurate range reduction for float (sinf, cosf)
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jsm28@gcc.gnu.org
    Classification: Unclassified


On x86_64 and x86, sinf and cosf have large errors (tens of thousands of ulps)
on some inputs, arising from inaccurate range reduction.  Examples extracted
from a log mistakenly attached to bug 5997 and discussed in bug 1163 are sinf
(0x1.7f4134p+103) and cosf (0x1.442f74p+15).  I'll send a 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] 6+ messages in thread

* [Bug math/14283] Inaccurate range reduction for float (sinf, cosf)
  2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
@ 2012-06-25 10:39 ` liubov.dmitrieva at gmail dot com
  2012-06-25 10:56 ` jsm28 at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: liubov.dmitrieva at gmail dot com @ 2012-06-25 10:39 UTC (permalink / raw)
  To: glibc-bugs

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

Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |liubov.dmitrieva at gmail
                   |                            |dot com
         Resolution|                            |FIXED

--- Comment #1 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> 2012-06-25 10:38:25 UTC ---
The patch works well.

Before patch <http://sourceware.org/ml/libc-alpha/2012-06/msg00650.html> 
applied Intel proprietary test framework yields the following results:

On I386:
Summary:
----------------------------------
Function     PASS/  Max Ulp   Roun
             FAIL    error    ding
----------------------------------
SINF         FAIL 6.987e+06   Near
SINF         FAIL 2.334e+07  +Inf 
SINF         FAIL 1.191e+07  -Inf 
SINF         FAIL 2.229e+06   Zero
----------------------------------
COSF         FAIL 1.141e+05   Near
COSF         FAIL 4.102e+05  +Inf 
COSF         FAIL 2.003e+05  -Inf 
COSF         FAIL 27.631139   Zero
----------------------------------

On x86_64:
Summary:
----------------------------------
Function     PASS/  Max Ulp   Roun
             FAIL    error    ding
----------------------------------
SINF         FAIL 7.390e+06   Near
SINF         FAIL 2.054e+07  +Inf 
SINF         FAIL 3.759e+06  -Inf 
SINF         FAIL 3.759e+06   Zero
----------------------------------
COSF         FAIL 2.489e+05   Near
COSF         FAIL 2.754e+05  +Inf 
COSF         FAIL 2.754e+05  -Inf 
COSF         FAIL 2.754e+05   Zero
----------------------------------


I applied the patch, and results now good (I allowed error 5 ulp, hence no
errors):

On I386:
Summary:
----------------------------------
Function     PASS/  Max Ulp   Roun
             FAIL    error    ding
----------------------------------
SINF         PASS  0.949884   Near
SINF         PASS  1.501194  +Inf 
SINF         PASS  1.542971  -Inf 
SINF         PASS  1.542971   Zero
----------------------------------
COSF         PASS  2.905172   Near
COSF         PASS  2.905172  +Inf 
COSF         PASS  3.905172  -Inf 
COSF         PASS  3.905172   Zero
----------------------------------


On x86_64:
Summary:
----------------------------------
Function     PASS/  Max Ulp   Roun
             FAIL    error    ding
----------------------------------
SINF         PASS  1.213484   Near
SINF         PASS  3.542971  +Inf 
SINF         PASS  1.854113  -Inf 
SINF         PASS  1.875448   Zero
----------------------------------
COSF         PASS  2.905172   Near
COSF         PASS  3.544283  +Inf 
COSF         PASS  3.905172  -Inf 
COSF         PASS  3.905172   Zero
----------------------------------

-- 
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/14283] Inaccurate range reduction for float (sinf, cosf)
  2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
  2012-06-25 10:39 ` [Bug math/14283] " liubov.dmitrieva at gmail dot com
@ 2012-06-25 10:56 ` jsm28 at gcc dot gnu.org
  2012-07-03 17:13 ` jsm28 at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-06-25 10:56 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

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

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-06-25 10:54:29 UTC ---
Thanks for the confirmation that my patch fixes all the issues your testsuite
finds in this area.

Please do not mark bugs resolved until the fix is checked in (to all relevant
branches, if applicable).  This fix is waiting until master reopens after the
2.16 branch before it can go in, given the potential need for libm-test-ulps
updates on other architectures.

-- 
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/14283] Inaccurate range reduction for float (sinf, cosf)
  2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
  2012-06-25 10:39 ` [Bug math/14283] " liubov.dmitrieva at gmail dot com
  2012-06-25 10:56 ` jsm28 at gcc dot gnu.org
@ 2012-07-03 17:13 ` jsm28 at gcc dot gnu.org
  2013-04-23  9:38 ` siddhesh at redhat dot com
  2014-06-13 18:19 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-07-03 17:13 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

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

--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-07-03 17:12:53 UTC ---
Fixed for 2.17 by:

commit 7a845b2c237434d4aad790aaba3a973e24ea802f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jul 3 17:10:42 2012 +0000

    Fix float range reduction problems (bug 14283).

-- 
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/14283] Inaccurate range reduction for float (sinf, cosf)
  2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-07-03 17:13 ` jsm28 at gcc dot gnu.org
@ 2013-04-23  9:38 ` siddhesh at redhat dot com
  2014-06-13 18:19 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: siddhesh at redhat dot com @ 2013-04-23  9:38 UTC (permalink / raw)
  To: glibc-bugs

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

Siddhesh Poyarekar <siddhesh at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simplyrahul17 at gmail dot
                   |                            |com

--- Comment #4 from Siddhesh Poyarekar <siddhesh at redhat dot com> 2013-04-23 09:38:19 UTC ---
*** Bug 15388 has been marked as a duplicate of this bug. ***

-- 
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/14283] Inaccurate range reduction for float (sinf, cosf)
  2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-04-23  9:38 ` siddhesh at redhat dot com
@ 2014-06-13 18:19 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:19 UTC (permalink / raw)
  To: glibc-bugs

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

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-13 18:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-22 20:40 [Bug math/14283] New: Inaccurate range reduction for float (sinf, cosf) jsm28 at gcc dot gnu.org
2012-06-25 10:39 ` [Bug math/14283] " liubov.dmitrieva at gmail dot com
2012-06-25 10:56 ` jsm28 at gcc dot gnu.org
2012-07-03 17:13 ` jsm28 at gcc dot gnu.org
2013-04-23  9:38 ` siddhesh at redhat dot com
2014-06-13 18:19 ` 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).