summaryrefslogtreecommitdiff
path: root/src/math/isinf.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-03 21:22:28 -0500
committerJakob Kaivo <jkk@ung.org>2019-03-03 21:22:28 -0500
commitf654b033b8b2982968e174e19be19a5ac461c107 (patch)
tree7c0ee958aac6fe9eb9e45d0c55c98c59344dafd0 /src/math/isinf.c
parente35f7dfb24a5b26679d34698f6f3c8c0207289fe (diff)
implement in terms of fpclassify()
Diffstat (limited to 'src/math/isinf.c')
-rw-r--r--src/math/isinf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/math/isinf.c b/src/math/isinf.c
index 9139197f..1a6b00ff 100644
--- a/src/math/isinf.c
+++ b/src/math/isinf.c
@@ -1,10 +1,6 @@
#include <math.h>
- int __isinff(float x);
- int __isinfd(double x);
- int __isinfl(long double x);
-#define isinf(x) ((sizeof (x) == sizeof (float)) ? __isinff(x) : \
- (sizeof (x) == sizeof (double)) ? __isinfd(x) : __isinfl(x))
+#define isinf(x) (fpclassify(x) == FP_INFINITE)
/*
STDC(199901)