summaryrefslogtreecommitdiff
path: root/libgcompat/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgcompat/math.c')
-rw-r--r--libgcompat/math.c91
1 files changed, 80 insertions, 11 deletions
diff --git a/libgcompat/math.c b/libgcompat/math.c
index 2982116..db123f8 100644
--- a/libgcompat/math.c
+++ b/libgcompat/math.c
@@ -1,27 +1,96 @@
-#include <math.h> /* isinf, isnan */
+#include <math.h> /* isfinite, isinf, isnan */
#include "alias.h" /* weak_alias */
-int __isinff(float number)
+/**
+ * Test for finite value.
+ */
+int __finite(double arg)
{
- return isinf(number);
+ return isfinite(arg);
}
-weak_alias(__isinff, isinff);
+weak_alias(__finite, finite);
+
+/**
+ * Test for finite value.
+ */
+int __finitef(float arg)
+{
+ return isfinite(arg);
+}
+weak_alias(__finitef, finitef);
+
+/**
+ * Test for finite value.
+ */
+int __finitel(long double arg)
+{
+ return isfinite(arg);
+}
+weak_alias(__finitel, finitel);
-int __isinf(double number)
+/**
+ * Test for infinity.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isinf.html
+ */
+int __isinf(double arg)
{
- return isinf(number);
+ return isinf(arg);
}
weak_alias(__isinf, isinf);
-int __isnanf(float number)
+/**
+ * Test for infinity.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isinff.html
+ */
+int __isinff(float arg)
{
- return isnan(number);
+ return isinf(arg);
}
-weak_alias(__isnanf, isnanf);
+weak_alias(__isinff, isinff);
-int __isnan(double number)
+/**
+ * Test for infinity.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isinfl.html
+ */
+int __isinfl(long double arg)
{
- return isnan(number);
+ return isinf(arg);
+}
+weak_alias(__isinfl, isinfl);
+
+/**
+ * Test for a NaN.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isnan.html
+ */
+int __isnan(double arg)
+{
+ return isnan(arg);
}
weak_alias(__isnan, isnan);
+
+/**
+ * Test for a NaN.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isnanf.html
+ */
+int __isnanf(float arg)
+{
+ return isnan(arg);
+}
+weak_alias(__isnanf, isnanf);
+
+/**
+ * Test for a NaN.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---isnanl.html
+ */
+int __isnanl(long double arg)
+{
+ return isnan(arg);
+}
+weak_alias(__isnanl, isnanl);