summaryrefslogtreecommitdiff
path: root/src/math/isnormal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/isnormal.c')
-rw-r--r--src/math/isnormal.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/math/isnormal.c b/src/math/isnormal.c
new file mode 100644
index 00000000..f4d9e175
--- /dev/null
+++ b/src/math/isnormal.c
@@ -0,0 +1,12 @@
+#include <math.h>
+ int __isnormalf(float x);
+ int __isnormald(double x);
+ int __isnormall(long double x);
+
+#define isnormal(x) ((sizeof (x) == sizeof (float)) ? __isnormalf(x) : \
+ (sizeof (x) == sizeof (double)) ? __isnormald(x) : __isnormall(x))
+
+/*
+STDC(199901)
+LINK(m)
+*/