summaryrefslogtreecommitdiff
path: root/src/math/logbf.c
blob: a0a0b5ed5be57de3e3ce05811af631f2ca88898a (plain)
1
2
3
4
5
6
7
8
9
10
#include <math.h>

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