#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; cout << uc.EvalStr("1/0") << endl; uc.Error().TrapOnDivideByZero(true); cout << uc.EvalStr("1/0") << endl; cout << uc.EvalStr("Sqrt(-1)") << endl; uc.Error().TrapOnInvalid(true); cout << uc.EvalStr("Sqrt(-1)") << endl; cout << uc.EvalStr("5*10^308") << endl; uc.Error().TrapOnOverflow(true); cout << uc.EvalStr("5*10^308") << endl; cout << uc.EvalStr("10^-308/10000") << endl; uc.Error().TrapOnUnderflow(true); cout << uc.EvalStr("10^-308/10000") << endl; }