aboutsummaryrefslogtreecommitdiff
path: root/src/math/logbf.c
blob: 4633a503b6fa7d6aeb136325bcf10e6e64145688 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <math.h>

float logbf(float x)
{
	if (!isfinite(x))
		return x * x;
	if (x == 0)
		return -1/(x*x);
	return ilogbf(x);
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif