public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode
@ 2013-12-20 18:24 jsm28 at gcc dot gnu.org
  2013-12-20 21:24 ` [Bug math/16356] " jsm28 at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-20 18:24 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16356
           Summary: Bad results from x86 / x86_64 expl in round-upward
                    mode
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org

In FE_UPWARD mode, on both x86_64 and x86, expl (0x2.c679d1f73f0fb628p+8L)
produces wild results (-0x9.8p+967) (with consequent wild results from coshl at
least).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug math/16356] Bad results from x86 / x86_64 expl in round-upward mode
  2013-12-20 18:24 [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode jsm28 at gcc dot gnu.org
@ 2013-12-20 21:24 ` jsm28 at gcc dot gnu.org
  2013-12-21 13:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-20 21:24 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Likewise, and for the same cause, exp10l (0x1.348e45573a1dd72cp+8L) gives
-0xc.3p+968.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug math/16356] Bad results from x86 / x86_64 expl in round-upward mode
  2013-12-20 18:24 [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode jsm28 at gcc dot gnu.org
  2013-12-20 21:24 ` [Bug math/16356] " jsm28 at gcc dot gnu.org
@ 2013-12-21 13:09 ` cvs-commit at gcc dot gnu.org
  2013-12-21 13:12 ` jsm28 at gcc dot gnu.org
  2014-06-13  9:29 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-12-21 13:09 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5b0626b9c50e69fe4d7dce90199d78f398c249b1 (commit)
      from  31e3a40588f6b215f2583c12ba29ff5cea63d2ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5b0626b9c50e69fe4d7dce90199d78f398c249b1

commit 5b0626b9c50e69fe4d7dce90199d78f398c249b1
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Dec 21 13:07:16 2013 +0000

    Fix x86 / x86_64 expl / expl10l wild results in directed rounding modes
(bug 16356).

    This patch fixes bug 16356, bad results from x86 / x86_64 expl /
    exp10l in directed rounding modes, the most serious of the bugs shown
    up by my patch expanding libm test coverage.  When I fixed bug 16293,
    I thought it was only necessary to set round-to-nearest when using
    frndint in expm1 functions, because in other cases the cancellation
    error from having the resulting fractional part close to 1 or -1 would
    not be significant.  However, in expl and exp10l, the way the final
    fractional part gets computed (something more complicated than a
    simple subtraction, because more precision is needed than you'd get
    that way) can result in a value outside the range [-1, 1] when the
    argument to frndint was very close to an integer and was rounded the
    "wrong" way because of the rounding mode - and the f2xm1 instruction
    has undefined results if its argument is outside [-1, 1], so resulting
    in the large errors seen.  So this patch removes the USE_AS_EXPM1L
    conditionals on the round-to-nearest settings, so all of expl, expm1l
    and exp10l now get round-to-nearest used for frndint (meaning the
    final fractional part can at most be slightly above 0.5 in
    magnitude).  Associated tests of exp and exp10 are added and testing
    of exp10 in directed rounding modes enabled.

    Tested x86_64 and x86 and ulps updated accordingly.

        * sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL): Also set
        round-to-nearest for [!USE_AS_EXPM1L].
        * sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL): Likewise.
        * math/auto-libm-test-in: Do not expect cosh tests to fail.  Add
        more tests of exp and exp10.  Expect some exp10 tests to miss
        exceptions or fail in directed rounding modes.
        * math/auto-libm-test-out: Regenerated.
        * math/libm-test.inc (exp10_tonearest_test_data): New array.
        (exp10_test_tonearest): New function.
        (exp10_towardzero_test_data): New array.
        (exp10_test_towardzero): New function.
        (exp10_downward_test_data): New array.
        (exp10_test_downward): New function.
        (exp10_upward_test_data): New array.
        (exp10_test_upward): New function.
        (main): Call the new functions.
        * sysdeps/i386/fpu/libm-test-ulps: Update.
        * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                         |   22 +
 NEWS                              |    2 +-
 math/auto-libm-test-in            |   27 +-
 math/auto-libm-test-out           | 1254 ++++++++++++++++++++++---------------
 math/libm-test.inc                |   60 ++
 sysdeps/i386/fpu/e_expl.S         |    4 -
 sysdeps/i386/fpu/libm-test-ulps   |  114 ++++-
 sysdeps/x86_64/fpu/e_expl.S       |    4 -
 sysdeps/x86_64/fpu/libm-test-ulps |  122 ++++-
 9 files changed, 1059 insertions(+), 550 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug math/16356] Bad results from x86 / x86_64 expl in round-upward mode
  2013-12-20 18:24 [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode jsm28 at gcc dot gnu.org
  2013-12-20 21:24 ` [Bug math/16356] " jsm28 at gcc dot gnu.org
  2013-12-21 13:09 ` cvs-commit at gcc dot gnu.org
@ 2013-12-21 13:12 ` jsm28 at gcc dot gnu.org
  2014-06-13  9:29 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-12-21 13:12 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.19.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug math/16356] Bad results from x86 / x86_64 expl in round-upward mode
  2013-12-20 18:24 [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode jsm28 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-12-21 13:12 ` jsm28 at gcc dot gnu.org
@ 2014-06-13  9:29 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13  9:29 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 18:24 [Bug math/16356] New: Bad results from x86 / x86_64 expl in round-upward mode jsm28 at gcc dot gnu.org
2013-12-20 21:24 ` [Bug math/16356] " jsm28 at gcc dot gnu.org
2013-12-21 13:09 ` cvs-commit at gcc dot gnu.org
2013-12-21 13:12 ` jsm28 at gcc dot gnu.org
2014-06-13  9:29 ` 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).