www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/03/14:31:40

Date: Sun, 3 Mar 1996 10:38:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Stephen L Moshier <moshier AT world DOT std DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: floating point library in V2
In-Reply-To: <DnnxIw.q0@world.std.com>
Message-Id: <Pine.SUN.3.91.960303102655.18857V-100000@is>
Mime-Version: 1.0

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? 

- Raw text -


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