public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3475: fabs == identity (i.e. fabs broken)
@ 2001-06-29 3:46 ak
0 siblings, 0 replies; 2+ messages in thread
From: ak @ 2001-06-29 3:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 3475
>Category: c++
>Synopsis: fabs == identity (i.e. fabs broken)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Jun 29 03:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: ak@ixion.net
>Release: 3.0
>Organization:
iXiONmedia
>Environment:
System: Linux dendrite 2.4.4 #4 Don Mai 3 00:14:41 CEST 2001 i586 unknown
Architecture: i586
host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: i586-pc-linux-gnu
configured with: ./configure --prefix=/opt/gcc-3.0/
>Description:
fabs.c ------------------------------------------------------------------------
#include <math.h>
#include <stdio.h>
int main() {
double u = -5;
printf("%lf\n",fabs(u));
}
-------------------------------------------------------------------------------
compiling this program results (correctly) in "5.0000" when compiled with
gcc fabs.c -o fabs
and (incorrectly) in "-5.00000" when compiled with
g++ fabs.c -o fabs
>How-To-Repeat:
>Fix:
write your own code for fabs
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/3475: fabs == identity (i.e. fabs broken)
@ 2001-08-12 3:33 gdr
0 siblings, 0 replies; 2+ messages in thread
From: gdr @ 2001-08-12 3:33 UTC (permalink / raw)
To: ak, gcc-bugs, gcc-prs, gdr, nobody
Synopsis: fabs == identity (i.e. fabs broken)
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-By: gdr
Responsible-Changed-When: Sun Aug 12 03:33:25 2001
Responsible-Changed-Why:
See below
State-Changed-From-To: open->closed
State-Changed-By: gdr
State-Changed-When: Sun Aug 12 03:33:25 2001
State-Changed-Why:
GCC-3.0.1 gives a correct result.
-- Gaby
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3475&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-12 3:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-29 3:46 c++/3475: fabs == identity (i.e. fabs broken) ak
2001-08-12 3:33 gdr
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).