first commit of the new libm!
[musl] / src / math / __signbit.c
diff --git a/src/math/__signbit.c b/src/math/__signbit.c
new file mode 100644 (file)
index 0000000..ffe717c
--- /dev/null
@@ -0,0 +1,13 @@
+#include "libm.h"
+
+// FIXME: macro
+int __signbit(double x)
+{
+       union {
+               double d;
+               uint64_t i;
+       } y = { x };
+       return y.i>>63;
+}
+
+