Current codebase uses an older style of error handling, via the errno flag and custom exception classes. It doesn't provide the level of felxibility that modern error handling techniques offer.
To improve the error handling, I propose updating the 'func_atan' function (as an exampel) to use modern C++ features.
I suggest we:
- Replace the throw_eval_exception and the MATH_ERROR exception class with
std::domain_error
- Replace if (errno) with std::isnan()
This requires:
Adding (#include 'cmath' , #include 'stdexcept') header files to funcs.cpp
Current codebase uses an older style of error handling, via the
errnoflag and custom exception classes. It doesn't provide the level of felxibility that modern error handling techniques offer.To improve the error handling, I propose updating the 'func_atan' function (as an exampel) to use modern C++ features.
I suggest we:
std::domain_errorThis requires:
Adding (#include 'cmath' , #include 'stdexcept') header files to funcs.cpp