This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/18219] exp2, exp2f spurious underflows


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

--- 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  b59549574efeeecf124de05c9183c120eaaa56f0 (commit)
      from  b57525f1a376149840f740a31535681c07152ba4 (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=b59549574efeeecf124de05c9183c120eaaa56f0

commit b59549574efeeecf124de05c9183c120eaaa56f0
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jun 23 14:35:18 2015 +0000

    Fix exp2, exp2f spurious underflows (bug 18219).

    The dbl-64 and flt-32 implementations of exp2 functions produce
    spurious underflow exceptions.  The underlying reason is the same in
    both cases: the computation works as (2^a - 1)*2^b + 2^b for suitably
    chosen a and b, where a has small magnitude so 2^a - 1 can be computed
    with a low-degree polynomial approximation, and (2^a - 1)*2^b can
    underflow even when the final result does not.  This patch fixes this
    by adjusting the threshold for when scaling is used to avoid
    intermediate underflow so it works for any possible value of a where
    the final result would not underflow.

    Tested for x86_64 and x86.

        [BZ #18219]
        * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Reduce
        threshold on absolute value of exponent for which scaling is used.
        * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise.
        * math/auto-libm-test-in: Add more tests of exp2.
        * math/auto-libm-test-out: Regenerated.

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

Summary of changes:
 ChangeLog                        |    9 ++
 NEWS                             |   12 ++--
 math/auto-libm-test-in           |    7 ++
 math/auto-libm-test-out          |  175 ++++++++++++++++++++++++++++++++++++++
 sysdeps/ieee754/dbl-64/e_exp2.c  |    4 +-
 sysdeps/ieee754/flt-32/e_exp2f.c |    4 +-
 6 files changed, 203 insertions(+), 8 deletions(-)

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]