summaryrefslogtreecommitdiff
path: root/src/math/_tgmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/_tgmath.h')
-rw-r--r--src/math/_tgmath.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h
new file mode 100644
index 00000000..01533baa
--- /dev/null
+++ b/src/math/_tgmath.h
@@ -0,0 +1,31 @@
+#ifndef __NONSTD_TGMATH_H__
+#define __NONSTD_TGMATH_H__
+#include <math.h>
+
+#ifdef TGSOURCE
+
+# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+# define TGFN(x) x##f
+# define TYPE float
+# define TGHUGE HUGE_VALF
+# include TGSOURCE
+# undef TGFN
+# undef TYPE
+# undef TGHUGE
+
+# define TGFN(x) x##l
+# define TYPE long double
+# define TGHUGE HUGE_VALL
+# include TGSOURCE
+# undef TGFN
+# undef TYPE
+# undef TGHUGE
+# endif
+
+#endif
+
+#define TGFN(x) x
+#define TYPE double
+#define TGHUGE HUGE_VAL
+
+#endif