Date: Sun, 3 Mar 1996 10:38:02 +0200 (IST) From: Eli Zaretskii To: Stephen L Moshier Cc: djgpp AT delorie DOT com Subject: Re: floating point library in V2 In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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?