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/16731] log(1) is -0, should be +0, in FE_DOWNWARD mode


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

--- Comment #1 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  f7be737659813220e1f29c8850c386a9654d549a (commit)
      from  a387428ca7330513d5f2a0924c45e6382d477052 (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=f7be737659813220e1f29c8850c386a9654d549a

commit f7be737659813220e1f29c8850c386a9654d549a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Mar 21 18:13:58 2014 +0000

    Fix log (1) in round-downward mode (bug 16731).

    According to ISO C Annex F, log (1) should be +0 in all rounding
    modes, but some implementations in glibc wrongly return -0 in
    round-downward mode (mapping to log1p (x - 1) is problematic because 1
    - 1 is -0 in round-downward mode, and log1p (-0) is -0).  This patch
    fixes this.  (It helps with some implementations of other functions
    such as acosh, log2 and log10 that call out to log, but not enough to
    enable all-rounding-modes testing for those functions without further
    fixes to other implementations of them.)

    Tested x86_64 and x86 and ulps updated accordingly, and did spot tests
    for mips64 for the ldbl-128 fix, and i586 for the sysdeps/i386/fpu
    implementations shadowed by those in sysdeps/i386/i686/fpu.

        [BZ #16731]
        * sysdeps/i386/fpu/e_log.S (__ieee754_log): Take absolute value
        when x - 1 is zero.
        * sysdeps/i386/fpu/e_logf.S (__ieee754_logf): Likewise.
        * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise.
        * sysdeps/i386/i686/fpu/e_logl.S (__ieee754_logl): Likewise.
        * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Return +0 when
        argument is 1.
        * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Likewise.
        * sysdeps/x86_64/fpu/e_logl.S: Take absolute value when x - 1 is
        zero.
        * math/libm-test.inc (log_test): Use ALL_RM_TEST.
        * sysdeps/i386/fpu/libm-test-ulps: Update.
        * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

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

Summary of changes:
 ChangeLog                         |   17 +++++++++++++++++
 NEWS                              |    2 +-
 math/libm-test.inc                |    4 +---
 sysdeps/i386/fpu/e_log.S          |    8 +++++++-
 sysdeps/i386/fpu/e_logf.S         |    8 +++++++-
 sysdeps/i386/fpu/e_logl.S         |    8 +++++++-
 sysdeps/i386/fpu/libm-test-ulps   |   12 ++++++++++++
 sysdeps/i386/i686/fpu/e_logl.S    |    8 +++++++-
 sysdeps/ieee754/dbl-64/e_log.c    |    4 ++++
 sysdeps/ieee754/ldbl-128/e_logl.c |    2 ++
 sysdeps/x86_64/fpu/e_logl.S       |    8 +++++++-
 sysdeps/x86_64/fpu/libm-test-ulps |   16 ++++++++++++++++
 12 files changed, 88 insertions(+), 9 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]