__signbit.c 141 字节
Newer Older
R
Rich Felker 已提交
1 2
#include "libm.h"

N
nsz 已提交
3
// FIXME: macro in math.h
R
Rich Felker 已提交
4 5 6 7 8 9 10 11 12 13
int __signbit(double x)
{
	union {
		double d;
		uint64_t i;
	} y = { x };
	return y.i>>63;
}