4/MINDOUBLE on SunOS = Inf, linux=floating exception??

4/MINDOUBLE on SunOS = Inf, linux=floating exception??

Post by Wig » Wed, 28 Jun 1995 04:00:00



When I write a simple problem to divide 4.0/MINDOUBLE and run it on a
Sparc10 the result is 'Inf' and this is good because my program doesn't
crash. On my Linux box the same calculation results in a 'floating
exception' and crash.

Is there someway I can get the Linux box to behave like the Sun machine?
I.E. handle floating exceptions as Inf??

(BTW I'm running GCC 2.7.0 and linux v1.3.3 if it matters)

- Jeff Wiegley

 
 
 

4/MINDOUBLE on SunOS = Inf, linux=floating exception??

Post by Peter Dalgaar » Thu, 29 Jun 1995 04:00:00


Try linking with -lieee

This disables all floating point exceptions. Not sure I like that convention
but many vendors seem to be following it. To turn exceptions back on
selectively ... wait for me to finalize my extended IEEE library some rainy day
during my vacation.

--
   O_   ---- Peter Dalgaard
  c/ /'  --- Dept. of Biostatistics
 ( ) \( ) -- University of Copenhagen