diff options
Diffstat (limited to 'tools/sysinc/math.h')
| -rw-r--r-- | tools/sysinc/math.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/sysinc/math.h b/tools/sysinc/math.h new file mode 100644 index 0000000..3809446 --- /dev/null +++ b/tools/sysinc/math.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef MATH_H +#define MATH_H + +#if 100 * __GNUC__ + __GNUC_MINOR__ >= 303 +#define NAN __builtin_nanf("") +#define INFINITY __builtin_inff() +#else +#define NAN (0.0f / 0.0f) +#define INFINITY 1e5000f +#endif + +float expf(float); + +#endif |
