Mail Archives: djgpp/1996/03/02/19:17:15
Xref: | news2.mv.net comp.os.msdos.djgpp:1594
|
Newsgroups: | comp.os.msdos.djgpp
|
From: | moshier AT world DOT std DOT com (Stephen L Moshier)
|
Subject: | floating point library in V2
|
Message-ID: | <DnnxIw.q0@world.std.com>
|
Organization: | The World Public Access UNIX, Brookline, MA
|
Date: | Sat, 2 Mar 1996 23:06:32 GMT
|
Lines: | 30
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Several postings to this list complain about floating point exceptions
with DJGPP V2. I have peeked at the libm sources, and am dismayed to
find that you are trying to get Sun's fdlibm routines to work.
That library requires a strict IEEE environment for proper functioning,
and you do not have that environment.
Consider the following valid IEEE program:
double o = 1.0;
double z = 0.0;
double i;
main ()
{
i = o / z;
}
The answer should be i = infinity.
Compiled with DJGPP V2, the program crashes with a floating point exception.
Why? Because the coprocessor is set to trap on divide by zero!
With no IEEE flags support system (or did I miss seeing it?) and the
coprocessor set wrong, it seems impossible that the library could have
been tested properly. One does not have to investigate further to
surmise that the library is very likely junk. Writing a free IEEE
library that actually works on an IBM PC would be a noble undertaking,
perhaps, but I think DJGPP users would be better served in the
meantime by putting that project on a side table and going back to the
old library.
- Raw text -