summaryrefslogtreecommitdiff
path: root/src/math/cbrt.c
blob: 0f8026b13057d4849b5f8b1a80d3f4ba4fdb1e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# define TGSOURCE "cbrt.c"
#include "_tgmath.h"
#include <math.h>

TYPE TGFN(cbrt)(TYPE x)
{
	SIGNAL_SAFE(0);
	switch (fpclassify(x)) {
	case FP_ZERO:		return x;
	case FP_INFINITE:	return x;
	}

	return x;
}

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