summaryrefslogtreecommitdiff
path: root/lib9/isnan-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9/isnan-posix.c')
-rw-r--r--lib9/isnan-posix.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib9/isnan-posix.c b/lib9/isnan-posix.c
new file mode 100644
index 00000000..ece5c0d8
--- /dev/null
+++ b/lib9/isnan-posix.c
@@ -0,0 +1,15 @@
+#include <lib9.h>
+
+int
+isNaN(double d)
+{
+ return isnan(d);
+}
+
+int
+isInf(double d, int sign)
+{
+ if(sign < 0)
+ return isinf(d) < 0;
+ return isinf(d);
+}