mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
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:
parent
403bc25412
commit
5c6877b02b
13 changed files with 576 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue