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/18980] i386 libm functions return with excess range and precision


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

--- 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  c8235dda728c4452f57c4c0d1bccc4e9a67da80c (commit)
      from  fe8c2b33aed067282ecac0cc3fdff1feef88548b (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=c8235dda728c4452f57c4c0d1bccc4e9a67da80c

commit c8235dda728c4452f57c4c0d1bccc4e9a67da80c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Sep 18 20:00:48 2015 +0000

    Avoid excess range overflowing results from cosh, sinh, lgamma (bug 18980).

    Various i386 libm functions return values with excess range and
    precision; Wilco Dijkstra's patches to make isfinite etc. expand
    inline cause this pre-existing issue to result in test failures (when
    e.g. a result that overflows float but not long double gets counted as
    overflowing for some purposes but not others).

    This patch addresses those cases arising from functions defined in C,
    adding a math_narrow_eval macro that forces values to memory to
    eliminate excess precision if FLT_EVAL_METHOD indicates this is
    needed, and is a no-op otherwise.  I'll convert existing uses of
    volatile and asm for this purpose to use the new macro later, once
    i386 has clean test results again (which requires fixes for .S files
    as well).

    Tested for x86_64 and x86.  Committed.

        [BZ #18980]
        * sysdeps/generic/math_private.h: Include <float.h>.
        (math_narrow_eval): New macro.
        [FLT_EVAL_METHOD != 0] (excess_precision): Likewise.
        * sysdeps/ieee754/dbl-64/e_cosh.c (__ieee754_cosh): Use
        math_narrow_eval on overflowing return value.
        * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r):
        Likewise.
        * sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise.
        * sysdeps/ieee754/flt-32/e_coshf.c (__ieee754_coshf): Likewise.
        * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r):
        Likewise.
        * sysdeps/ieee754/flt-32/e_sinhf.c (__ieee754_sinhf): Likewise.

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

Summary of changes:
 ChangeLog                            |   16 ++++++++++++++++
 sysdeps/generic/math_private.h       |   24 ++++++++++++++++++++++++
 sysdeps/ieee754/dbl-64/e_cosh.c      |    2 +-
 sysdeps/ieee754/dbl-64/e_lgamma_r.c  |    2 +-
 sysdeps/ieee754/dbl-64/e_sinh.c      |    2 +-
 sysdeps/ieee754/flt-32/e_coshf.c     |    2 +-
 sysdeps/ieee754/flt-32/e_lgammaf_r.c |    2 +-
 sysdeps/ieee754/flt-32/e_sinhf.c     |    2 +-
 8 files changed, 46 insertions(+), 6 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]