www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/03/15:19:02

Date: Sun, 3 Mar 1996 08:43:50 -0500 (EST)
From: Stephen L Moshier <moshier AT world DOT std DOT com>
Subject: Re: floating point library in V2
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
Olaf Flebbe <flebbe AT pluto DOT tat DOT physik DOT uni-tuebingen DOT de>
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.960303102655.18857V-100000@is>
Message-Id: <Pine.3.89.9603030804.A24926-0100000@world.std.com>
Mime-Version: 1.0


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019