> Is there some API for it in C? In C99, you have access to the floating-point environment: #include <fenv.h> /* ... */ { #pragma STDC FENV_ACCESS ON int set_excepts; feclearexcept(FE_INEXACT | FE_OVERFLOW); // maybe raise exceptions set_excepts = fetestexcept(FE_INEXACT | FE_OVERFLOW); if (set_excepts & FE_INEXACT) f(); if (set_excepts & FE_OVERFLOW) g(); /* ... */ } It defines the following symbolic exception constants: FE_DIVBYZERO FE_INEXACT FE_INVALID FE_OVERFLOW FE_UNDERFLOW Few compilers support that, though. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4