Introduce support for trapping math

The feenableexcept() and fedisableexcept() APIs are now provided which
let you detect when NaNs appear the moment it happens from anywhere in
your program. Tests have also been added for the mission critical math
functions expf() and erff(), whose perfect operation has been assured.
See examples/trapping.c to see how to use this powerful functionality.
This commit is contained in:
Justine Tunney 2024-04-30 13:32:23 -07:00
parent 403bc25412
commit 5c6877b02b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 576 additions and 2 deletions

View file

@ -81,6 +81,8 @@ int fesetenv(const fenv_t *);
int fesetexceptflag(const fexcept_t *, int);
int fesetround(int);
int fetestexcept(int);
int feenableexcept(int);
int fedisableexcept(int);
int feupdateenv(const fenv_t *);
int __flt_rounds(void);
int __fesetround(int);