mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 17:52:27 +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
|
@ -2,6 +2,12 @@
|
|||
#define COSMOPOLITAN_LIBC_THREAD_THREADS_H_
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#if !defined(__cplusplus) && \
|
||||
(!(defined(__GNUC__) && __GNUC__ >= 13) || \
|
||||
!(defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L))
|
||||
#define thread_local _Thread_local
|
||||
#endif
|
||||
|
||||
#define TSS_DTOR_ITERATIONS 4
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue