Mail Archives: djgpp/1996/03/03/15:19:02
On Sun, 3 Mar 1996, Eli Zaretskii wrote:
>
> On Sat, 2 Mar 1996, Stephen L Moshier wrote:
>
> > 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
>
> There is a library function called _control87 which can be used to put the
> coprocessor in a state that doesn't cause FP exception. As far as I know,
> if you mask the zero-divide exception, the coprocessor should return Inf.
> Can you please look at that function (and maybe even try using it with the
> library) and tell if the program you posted in particular, and the libm.a
> library in general, can be made work? Maybe there is something useful to
> do with that library except tossing it altogether, after all?
I do not know what progress has been achieved to make fdlibm work on a
PC. The last time I talked to Sun about it was a year ago, while I was
helping to get their test suite to run on something other than a Sun
workstation or with a Sun compiler. They did not seem to have much
concept of portability. There are some very good algorithmic ideas
in fdlibm, but there are also a lot of IEEE dependencies that raise
problems.
I do know that Linux has not adopted it, though the Linux libm does
use a version of the cube root and maybe a few other ideas.
Perhaps Olaf Flebbe can tell us if someone is working on it.
- Raw text -