home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
spoc88
/
cflt20
/
matherr.c
< prev
next >
Wrap
Text File
|
1988-06-02
|
557b
|
26 lines
#include <math.h>
#include <float.h>
#define INF (1./0.)
#define NAN (0./0.)
void startfp(void)
{
/* mask all exceptions but denormal */
_control87(MCW_EM-EM_DENORMAL,MCW_EM);
HUGE_VAL = +INF;
}
/* this gets called by library functions
if a domain or range error occurs
*/
int cdecl matherr(struct exception *e)
{
/* return nonzero to show error has been handled */
/* lib functions will return something sensible, */
/* if you let them */
/* we don't need no steenkeen' errors! */
return 1;
}