public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/369] New: pow problems on x86
@ 2004-09-06 12:24 vargaz at gmail dot com
2004-12-18 15:37 ` [Bug math/369] " aj at suse dot de
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: vargaz at gmail dot com @ 2004-09-06 12:24 UTC (permalink / raw)
To: glibc-bugs
Consider the following test program:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#include <stdio.h>
#include <math.h>
void main() {
double d;
d = pow (-2, 1E300);
printf ("D: %f.\n", d);
d = pow (-2, -1E300);
printf ("D: %f.\n", d);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Under x86 linux, this prints out:
D: nan.
D: nan
I think the answer should be +inf and 0, respectively. Both
solaris,
windows, and the IBM Accurate Portable Mathematical library
returns
these values, so I think this might be a bug in the assembly
language
pow routine in glibc.
--
Summary: pow problems on x86
Product: glibc
Version: 2.3.2
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: vargaz at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
@ 2004-12-18 15:37 ` aj at suse dot de
2006-05-07 14:57 ` steven at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2004-12-18 15:37 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aj at suse dot de 2004-12-18 15:37 -------
The report is confirmed. On other platforms we get the expected result.
Uli, could you look into this, please?
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|aj at suse dot de |drepper at redhat dot com
Status|NEW |ASSIGNED
http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
2004-12-18 15:37 ` [Bug math/369] " aj at suse dot de
@ 2006-05-07 14:57 ` steven at gcc dot gnu dot org
2006-06-15 9:17 ` nikolay dot zhuravlev at auriga dot ru
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-05-07 14:57 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2006-05-07 14:57 -------
It seems I've run into this one now, too. What happened to this bug?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu dot
| |org
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
2004-12-18 15:37 ` [Bug math/369] " aj at suse dot de
2006-05-07 14:57 ` steven at gcc dot gnu dot org
@ 2006-06-15 9:17 ` nikolay dot zhuravlev at auriga dot ru
2006-06-15 9:24 ` nikolay dot zhuravlev at auriga dot ru
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: nikolay dot zhuravlev at auriga dot ru @ 2006-06-15 9:17 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From nikolay dot zhuravlev at auriga dot ru 2006-06-15 09:17 -------
I built glibc from CVS on 2006/06/14 and the bug is still there.
I think the culprit is the assembler code in __ieee754_pow.
POSIX wants HUGE_VAL for pow(-2, 1E300).
--
What |Removed |Added
----------------------------------------------------------------------------
Version|2.3.2 |2.4
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (2 preceding siblings ...)
2006-06-15 9:17 ` nikolay dot zhuravlev at auriga dot ru
@ 2006-06-15 9:24 ` nikolay dot zhuravlev at auriga dot ru
2006-08-31 22:27 ` eberlein at us dot ibm dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: nikolay dot zhuravlev at auriga dot ru @ 2006-06-15 9:24 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From nikolay dot zhuravlev at auriga dot ru 2006-06-15 09:23 -------
Changed version to 'unspecified' since it is in the trunk
--
What |Removed |Added
----------------------------------------------------------------------------
Version|2.4 |unspecified
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (3 preceding siblings ...)
2006-06-15 9:24 ` nikolay dot zhuravlev at auriga dot ru
@ 2006-08-31 22:27 ` eberlein at us dot ibm dot com
2006-08-31 22:32 ` eberlein at us dot ibm dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: eberlein at us dot ibm dot com @ 2006-08-31 22:27 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From eberlein at us dot ibm dot com 2006-08-31 22:27 -------
Created an attachment (id=1269)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1269&action=view)
patch for pow to return inf/0 for (-2,+/-1E300)
I've created a patch to return inf for pow(-2,1E300) and 0 for pow(-2,-1E300).
This patch modifies the function to use |x| and filter the result if x < 0,
keeping inf or zero, otherwise return NaN.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (4 preceding siblings ...)
2006-08-31 22:27 ` eberlein at us dot ibm dot com
@ 2006-08-31 22:32 ` eberlein at us dot ibm dot com
2007-12-15 9:46 ` ismail at pardus dot org dot tr
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: eberlein at us dot ibm dot com @ 2006-08-31 22:32 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From eberlein at us dot ibm dot com 2006-08-31 22:32 -------
Created an attachment (id=1270)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1270&action=view)
patch for pow to return inf/0 for (-2,+/-1E300)
oops, fixing the diff since it had some control chars accidentally pasted into
the file.
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #1269 is|0 |1
obsolete| |
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (5 preceding siblings ...)
2006-08-31 22:32 ` eberlein at us dot ibm dot com
@ 2007-12-15 9:46 ` ismail at pardus dot org dot tr
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ismail at pardus dot org dot tr @ 2007-12-15 9:46 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From ismail at pardus dot org dot tr 2007-12-15 09:46 -------
Still affects glibc 2.7
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ismail at pardus dot org dot
| |tr
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (6 preceding siblings ...)
2007-12-15 9:46 ` ismail at pardus dot org dot tr
@ 2008-07-30 9:18 ` mtk dot manpages at gmail dot com
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
2010-09-12 5:44 ` mtk dot manpages at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-30 9:18 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtk dot manpages at gmail
| |dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (7 preceding siblings ...)
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
@ 2008-07-30 9:18 ` mtk dot manpages at gmail dot com
2010-09-12 5:44 ` mtk dot manpages at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-07-30 9:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From mtk dot manpages at gmail dot com 2008-07-30 09:17 -------
Still present in glibc 2.8
--
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
* [Bug math/369] pow problems on x86
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
` (8 preceding siblings ...)
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
@ 2010-09-12 5:44 ` mtk dot manpages at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: mtk dot manpages at gmail dot com @ 2010-09-12 5:44 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From mtk dot manpages at gmail dot com 2010-09-12 05:44 -------
Still present in glibc 2.12.1, where we get:
D: -nan.
D: -nan.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=369
------- 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] 11+ messages in thread
end of thread, other threads:[~2010-09-12 5:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-06 12:24 [Bug math/369] New: pow problems on x86 vargaz at gmail dot com
2004-12-18 15:37 ` [Bug math/369] " aj at suse dot de
2006-05-07 14:57 ` steven at gcc dot gnu dot org
2006-06-15 9:17 ` nikolay dot zhuravlev at auriga dot ru
2006-06-15 9:24 ` nikolay dot zhuravlev at auriga dot ru
2006-08-31 22:27 ` eberlein at us dot ibm dot com
2006-08-31 22:32 ` eberlein at us dot ibm dot com
2007-12-15 9:46 ` ismail at pardus dot org dot tr
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
2008-07-30 9:18 ` mtk dot manpages at gmail dot com
2010-09-12 5:44 ` mtk dot manpages at gmail dot com
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).