This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix log (1) in round-downward mode (bug 16731)
- From: Adam Conrad <adconrad at 0c3 dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, aurelien at aurel32 dot net
- Date: Fri, 21 Mar 2014 14:11:11 -0600
- Subject: Re: Fix log (1) in round-downward mode (bug 16731)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1403211746350 dot 4557 at digraph dot polyomino dot org dot uk>
On Fri, Mar 21, 2014 at 05:47:45PM +0000, Joseph S. Myers wrote:
> 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.)
This reminds me (in context) of this patch we're carrying in Debian:
http://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/trunk/debian/patches/powerpc/local-math-logb.diff?revision=5951&view=markup
If I recall, Aurelien said we're carrying it locally because it was
rejected upstream as not a bug, due to it only affecting older HW
that no one cares about.
Should we be cleaning this up and re-submitting, to go along with
your batch of fixes here?
... Adam