summaryrefslogtreecommitdiff
path: root/src/math/llrint.c
blob: 168ef5df1b2ea8105e78a54fee52bd774f201f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#if 0

# define TGSOURCE "llrint.c"
#include "_tgmath.h"
#include <math.h>
#include <limits.h>
#include <fenv.h>

long long int TGFN(llrint)(TYPE x)
{
	switch (fpclassify(x)) {
	case FP_ZERO:
		return 0;

	case FP_INFINITE:
		feraiseexcept(FE_INVALID);
		return signbit(x) ? LLONG_MIN : LLONG_MAX;

	default:
		break;
	}

	return x;
}

/*
STDC(199901)
LINK(m)
*/


#endif