Mail Archives: djgpp/1992/11/21/12:59:22
We've got an interpreter that needs to check floating point values
for overflow and to catch divide by zero. On (most) UNIX systems, an
overflow can be detected by comparing the result with HUGE_VAL, and a
floating point divide by zero causes a signal(SIGFPE).
With djgpp (1.08), comparing a double against MAXDOUBLE and dividing
by zero both cause an error trap (in fact, the *compiler* exits when
trying to evaluate expressions like "double a = 10.0 / 0.0;"). This
error trap also locks up DESQview/X :-(
Is there any way to catch this error, and is there any way to check
for overflow?
Thanks in advance for any information,
Scott
--
***********************************************************************
* Scott Raney 303-447-3936 Remember: the better you look, *
* raney AT metacard DOT com the more you'll see -- Lidia *
***********************************************************************
- Raw text -