summaryrefslogtreecommitdiff
path: root/src/math/__signbit.c
blob: e700b6b75fcb91e1919ad64b7da4e8c6a16f6065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "libm.h"

// FIXME: macro in math.h
int __signbit(double x)
{
	union {
		double d;
		uint64_t i;
	} y = { x };
	return y.i>>63;
}