public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions
@ 2007-01-25 12:58 kreckel at ginac dot de
2007-03-15 13:49 ` [Bug math/3919] " jakub at redhat dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: kreckel at ginac dot de @ 2007-01-25 12:58 UTC (permalink / raw)
To: glibc-bugs
I've conducted a survey of the qNaN propagation of all C99 <math.h> functions on
i386 and found the following nonconformances:
- The acosh and acoshf functions raise the invalid exception flag if their
argument is a quiet NaN. (The acoshl function does not do that.)
- The log, logf, and logl functions raise the invalid exception flag if
their argument is a quiet NaN.
- The ilogb, ilogbf, and ilogbl raise the invalid exception flag if their
argument is a quiet NaN. According to C99, they should compute
P_ILOGBNAN. They do not appear to be required to raise a domain error
and I have doublts this is in accordance with the spirit of IEEE754.
--
Summary: Quiet NaNs not propagated quietly by some math functions
Product: glibc
Version: 2.4
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: kreckel at ginac dot de
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=3919
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug math/3919] Quiet NaNs not propagated quietly by some math functions
2007-01-25 12:58 [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions kreckel at ginac dot de
@ 2007-03-15 13:49 ` jakub at redhat dot com
2007-03-15 17:22 ` jakub at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at redhat dot com @ 2007-03-15 13:49 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2007-03-15 13:49 -------
acosh{,f,l} certainly don't raise that:
#define _GNU_SOURCE
#include <math.h>
#include <fenv.h>
#include <stdio.h>
volatile double n = NAN;
volatile double d;
volatile float f;
volatile long double ld;
volatile int i;
int
main (void)
{
feclearexcept (FE_ALL_EXCEPT);
d = acosh (n);
f = acoshf (n);
ld = acoshl (n);
printf ("%x\n", fetestexcept (FE_INVALID));
i = ilogb (n);
i = ilogbf (n);
i = ilogbl (n);
printf ("%x\n", fetestexcept (FE_INVALID));
d = log (n);
f = logf (n);
ld = logl (n);
printf ("%x\n", fetestexcept (FE_INVALID));
return 0;
}
prints 0, 1, 1 with both -m32 -fno-builtin and -m64 -fno-builtin on x86_64
with current CVS glibc.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=3919
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug math/3919] Quiet NaNs not propagated quietly by some math functions
2007-01-25 12:58 [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions kreckel at ginac dot de
2007-03-15 13:49 ` [Bug math/3919] " jakub at redhat dot com
@ 2007-03-15 17:22 ` jakub at redhat dot com
2007-03-15 20:12 ` drepper at redhat dot com
2007-07-12 14:58 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at redhat dot com @ 2007-03-15 17:22 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2007-03-15 17:22 -------
For ilogb{,f,l} my reading of
http://www.opengroup.org/onlinepubs/009695399/functions/ilogb.html
is that FE_INVALID should be raised for 0/+-Inf/NaN.
log{,f,l}(NAN) raising FE_INVALID on the other side is a bug and I have posted
a patch for that already:
http://sources.redhat.com/ml/libc-hacker/2007-03/msg00024.html
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3919
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug math/3919] Quiet NaNs not propagated quietly by some math functions
2007-01-25 12:58 [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions kreckel at ginac dot de
2007-03-15 13:49 ` [Bug math/3919] " jakub at redhat dot com
2007-03-15 17:22 ` jakub at redhat dot com
@ 2007-03-15 20:12 ` drepper at redhat dot com
2007-07-12 14:58 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2007-03-15 20:12 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2007-03-15 20:12 -------
Fixed in cvs.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=3919
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug math/3919] Quiet NaNs not propagated quietly by some math functions
2007-01-25 12:58 [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions kreckel at ginac dot de
` (2 preceding siblings ...)
2007-03-15 20:12 ` drepper at redhat dot com
@ 2007-07-12 14:58 ` cvs-commit at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2007-07-12 14:58 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2007-07-12 14:58 -------
Subject: Bug 3919
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_5-branch
Changes by: jakub@sourceware.org 2007-07-12 14:58:36
Modified files:
. : ChangeLog
math : libm-test.inc
sysdeps/i386/fpu: e_log.S e_logf.S e_logl.S
sysdeps/x86_64/fpu: e_log10l.S e_log2l.S e_logl.S s_log1pl.S
Log message:
2007-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ #3919]
* math/libm-test.inc (log_test): Test -Inf and NaN.
(log10_test, log1p_test, log2_test): Test -Inf.
* sysdeps/i386/fpu/e_log.S (__ieee754_log): Don't raise
FE_INVALID when argument is qNaN.
* sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise.
* sysdeps/i386/fpu/e_logf.S (__ieee754_logf): Likewise.
* sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise.
* sysdeps/x86_64/fpu/e_log10l.S (__ieee754_log10l): Replace
andb $1, %ah with testb $1, %ah, don't test for parity, instead
testb $4, %ah and jump if non-zero.
* sysdeps/x86_64/fpu/e_log2l.S (__ieee754_log2l): Likewise.
* sysdeps/x86_64/fpu/s_log1pl.S (__log1pl): Likewise.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.10362.2.52&r2=1.10362.2.53
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/math/libm-test.inc.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.73.2.1&r2=1.73.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu/e_log.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu/e_logf.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu/e_logl.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/x86_64/fpu/e_log10l.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.1&r2=1.1.10.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/x86_64/fpu/e_log2l.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.1&r2=1.1.10.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/x86_64/fpu/e_logl.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.1&r2=1.1.10.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/x86_64/fpu/s_log1pl.S.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.1&r2=1.1.10.1
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3919
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-12 14:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-25 12:58 [Bug math/3919] New: Quiet NaNs not propagated quietly by some math functions kreckel at ginac dot de
2007-03-15 13:49 ` [Bug math/3919] " jakub at redhat dot com
2007-03-15 17:22 ` jakub at redhat dot com
2007-03-15 20:12 ` drepper at redhat dot com
2007-07-12 14:58 ` cvs-commit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).