1 2 3 4 5 6 7 8 9 10 11
#include <stdint.h> // for uint64_t // FIXME: macro in math.h int __signbit(double x) { union { double d; uint64_t i; } y = { x }; return y.i >> 63; }