about summary refs log tree commit diff
path: root/src/math/__signbitl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/__signbitl.c')
-rw-r--r--src/math/__signbitl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math/__signbitl.c b/src/math/__signbitl.c
new file mode 100644
index 00000000..81adb6ce
--- /dev/null
+++ b/src/math/__signbitl.c
@@ -0,0 +1,11 @@
+#include "libm.h"
+
+// FIXME: should be a macro
+#if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
+int __signbitl(long double x)
+{
+	union ldshape u = {x};
+
+	return u.bits.sign;
+}
+#endif