I am trying to figure out why the following program produces a
floating point exception and core dumps.
double a = 1e200;
b = a*a;
printf("b > DBL_MAX: %d\n",b>DBL_MAX);
My output is,
Floating exception (core dumped)
I started with this on -questions and (although the thread got
sidetracked by a bad test program I presented at the beginning) other
FreeBSDers have not reproduced the error, but get what I would expect,
b > DBL_MAX: 1
However, I get the FPE and core dump on my three FreeBSD machines
(different hardware on each). All are,
FreeBSD pc252.scitec.com 2.2.8-STABLE FreeBSD 2.2.8-STABLE #0: Mon Mar 1 14:25:39 EST 1999
Give or take a few days on the CVSup. (All were recently built to
2.2.8-S from 2.2.7-R.)
It has been suggested I have somehow mucked up my floating point,
but I do not know where to start and -questions did not
produce many leads.
Thanks for any help. More details can be provided; I would not know
where to start.
Crist J. Clark firstname.lastname@example.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message