about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/math_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/math_private.h')
-rw-r--r--sysdeps/ieee754/flt-32/math_private.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/math_private.h b/sysdeps/ieee754/flt-32/math_private.h
new file mode 100644
index 0000000000..e33db02b4c
--- /dev/null
+++ b/sysdeps/ieee754/flt-32/math_private.h
@@ -0,0 +1,35 @@
+#ifndef _MATH_PRIVATE_H_
+
+#include_next <math_private.h>
+
+#ifndef __isnanf
+extern __always_inline int
+__isnanf (float d)
+{
+  u_int32_t di;
+  GET_FLOAT_WORD (di, d);
+  return (di & 0x7fffffff) > 0x7f800000;
+}
+#endif
+
+#ifndef __isinf_nsf
+extern __always_inline int
+__isinf_nsf (float d)
+{
+  u_int32_t di;
+  GET_FLOAT_WORD (di, d);
+  return (di & 0x7fffffff) == 0x7f800000;
+}
+#endif
+
+#ifndef __finitef
+extern __always_inline int
+__finitef (float d)
+{
+  u_int32_t di;
+  GET_FLOAT_WORD (di, d);
+  return (di & 0x7fffffff) < 0x7f800000;
+}
+#endif
+
+#endif /* _MATH_PRIVATE_H_ */