diff options
| author | magh <magh@maghmogh.com> | 2023-03-06 18:44:55 -0600 |
|---|---|---|
| committer | magh <magh@maghmogh.com> | 2023-03-06 18:44:55 -0600 |
| commit | e80d9d8871b325a04b18f90a9ea4bb7fd148fb25 (patch) | |
| tree | 79dbdb8506b7ff1e92549188d1b94cfc0b3503ae /tools/sysinc/math.h | |
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 |
