summaryrefslogtreecommitdiff
path: root/lib/libm/logbf.c
blob: 2344ed3ad8496e70f09dfb6d7c9681f67e982f11 (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);
}