xref: /haiku/src/system/libroot/posix/musl/math/logbf.c (revision 4a55cc230cf7566cadcbb23b1928eefff8aea9a2)
1 #include <math.h>
2 
3 float logbf(float x)
4 {
5 	if (!isfinite(x))
6 		return x * x;
7 	if (x == 0)
8 		return -1/(x*x);
9 	return ilogbf(x);
10 }
11