summaryrefslogtreecommitdiff
path: root/libs/qm-dsp/maths/nan-inf.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/qm-dsp/maths/nan-inf.h')
-rw-r--r--libs/qm-dsp/maths/nan-inf.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/qm-dsp/maths/nan-inf.h b/libs/qm-dsp/maths/nan-inf.h
new file mode 100644
index 0000000000..8191713000
--- /dev/null
+++ b/libs/qm-dsp/maths/nan-inf.h
@@ -0,0 +1,20 @@
+
+#ifndef NAN_INF_H
+#define NAN_INF_H
+
+#include <math.h>
+
+#ifdef sun
+
+#include <ieeefp.h>
+#define ISNAN(x) ((sizeof(x)==sizeof(float))?isnanf(x):isnand(x))
+#define ISINF(x) (!finite(x))
+
+#else
+
+#define ISNAN(x) isnan(x)
+#define ISINF(x) isinf(x)
+
+#endif
+
+#endif