[comp.lang.c] Floating point error handlers

sterling@uwovax.uwo.ca (11/29/90)

I have been writing my own numerical routines for some time now. I've been
writing in Borland's TurboC for an IBM model 50. DO to my limited knowledge
of the PC, I've been unable to write an error handler for my routines. I'd
like something similar to matherr(). It would be nice to save my data before
the program crashes. Has anyone a pointer to references or suggestions for 
implementing such a scheme.

Also, I've noticed that printf, and its relatives, produce floating point
errors if the value to be printed is too large. Can I trap this behaviour?

Thanks,
	Sterling

#define	DO	Due

-- 
Sterling Gunn                 |   "A (person)'s character is (their) fate."
1013_4111@UWOVAX.UWO.CA       |    Socrates?         
Dept. of Applied Mathematics  |          
University of Western Ontario |          
London, Ontario               |       
Canada                        |   
______________________________|   

tsommers@zodiac.rutgers.edu (11/29/90)

In article <7898.27539e21@uwovax.uwo.ca>, sterling@uwovax.uwo.ca writes:
> I have been writing my own numerical routines for some time now. I've been
> writing in Borland's TurboC for an IBM model 50. DO to my limited knowledge
> of the PC, I've been unable to write an error handler for my routines. I'd
> like something similar to matherr(). It would be nice to save my data before
> the program crashes. Has anyone a pointer to references or suggestions for 
> implementing such a scheme.

The source for matherr() is included in the Turbo C distribution, so
perhaps you could use that as a starting place.