summaryrefslogtreecommitdiff
path: root/src/math/ilogb.c
blob: 8c24aecbe814b60eac641dfe55fc3e98c564bf98 (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
#if 0

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

int TGFN(ilogb)(TYPE x)
{
	switch (fpclassify(x)) {
	case FP_ZERO:		feraiseexcept(FE_INVALID); return FP_ILOGB0;
	case FP_INFINITE:	feraiseexcept(FE_INVALID); return INT_MAX;
	case FP_NAN:		feraiseexcept(FE_INVALID); return FP_ILOGBNAN;
	default:		break;
	}

	return x;
}

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


#endif