This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Egcs 1.1.1/Linux with -O2 -mno-ieee-fp


Hi,
:-(On Thu, 7 Jan 1999, Claus Fischer wrote:
:-(result should be 0, but it is Inf
everybody hates this, but for me it works..
as a mild guess: Probably libc?
Details interspersed below.

Later,
	s t e f a n.

#-----8<------8<------8<------8<------8<------8<------8<------#
:-)                      /* sorry 4 reformat, less lines -sdr */
:-) #include <stdlib.h>
:-) #include <math.h>
:-) #include <stdio.h>
:-) double p(double x,double y) {
:-)     double const xx = fabs(x);
:-)     double const yy = fabs(y);
:-)     if (xx >= yy) { return 0; } else { return x/y; }
:-) }
:-) int main() {
:-)     double x = strtod("1.2e-6",0) - strtod("-0.2e-6",0), y = 0, r;
:-)     r = p(x,y);
:-)     printf("%e %e %e\n",x,y,r);
:-)     return 0;
:-) }
#-----8<------8<------8<------8<------8<------8<------8<------#

:-) System: SuSE Linux 5.3 (international)
:-)  libc 5.4.46
libc 5.4.44

:-)  kernel 2.2.0-pre4 (compiled with gcc 2.7.2.1)
kernel 2.0.35 (gcc 2.7.2.3)

:-)  Pentium II
P*ntiumPro 200

:-)              /usr/local/egcs/gcc --version: egcs-2.91.60
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)

:-) Command: $ t
:-)             1.400000e-06 0.000000e+00 Inf
1.400000e-06 0.000000e+00 0.000000e+00

:-) Compilation: $ /usr/local/egcs/bin/gcc -v -H -O2 -mno-ieee-fp -o t t.c
ditto

---
Day:    Stefan Drees <sdrees@acm.org>, Phone ++49 2203 601 - 3542
Night:  Stefan Drees <sdrees@manchmal.rhein.de>, Phone ++49 228 934 35 14
Browse: http://www.sdrees.de/stefan/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]