M
mmacrobert
Hi there,
I'm having trouble making some code do a "graceful" recovery for
mathematical operations. Certain functions e.g. log10, will call
"matherr" and provides an avenue for intervention in a result.
How can I do the same in a portable fashion for arithmetic operations?
For example, catching dividing by zero using scalars (int's,doubles
etc.)?
Is there a standard way of getting C++ to throw some kind of
std::exception when a math-error results? Is there any standard
implementations for this somewhere?
Thanks,
Martin
I'm having trouble making some code do a "graceful" recovery for
mathematical operations. Certain functions e.g. log10, will call
"matherr" and provides an avenue for intervention in a result.
How can I do the same in a portable fashion for arithmetic operations?
For example, catching dividing by zero using scalars (int's,doubles
etc.)?
Is there a standard way of getting C++ to throw some kind of
std::exception when a math-error results? Is there any standard
implementations for this somewhere?
Thanks,
Martin