This is the mail archive of the libc-alpha@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] |
Hi,log1pl (-1) now returns with -inf instead of +inf in FE_DOWNWARD rounding mode. The source code producing the -inf for the double/float variants is the same, but on S390 the compiler generates a division by constant +zero and ignores the (x-x).
Thus i also changed it to the constant zero in the double/float functions. IÂve tested it on S390.Please test it on other platforms because there are also reports for the same failure on aarch64 (see bug comment 1)
and sparc (https://www.sourceware.org/ml/libc-alpha/2014-04/msg00410.html). Give feedback in order to commit the patch. Bye --- 2014-04-22 Stefan Liebler <stli@linux.vnet.ibm.com> [BZ #16823] * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Always divide by positive zero when computing -Inf result. * sysdeps/ieee754/dbl-64/s_log1p.c (__log1p): Likewise. * sysdeps/ieee754/flt-32/s_log1pf.c (__log1pf): Likewise. --- On 04/09/2014 03:24 PM, Stefan Liebler wrote:
Hi, on S390 test-double fails for log1pl(-1) with infinity has wrong sign in rounding mode FE_DOWNWARD. See Bug 16823. In this rounding mode, (x-x) = -0. In all other rounding modes, (x-x) = +0. A division with divisor -0 leads to +inf, while +0 results in -inf as expected. This patch changes the divisor to a const +0. Tested on s390/s390x. Is this okay? Bye --- 2014-04-09 Stefan Liebler <stli@linux.vnet.ibm.com> [BZ #16823] * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Use const positive zero instead of (x-x). ---
Attachment:
patchglibc_math_log1pl_-1_20140422
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |