math: fix tgamma to raise underflow for large negative values
[oweals/musl.git] / src / math / logbf.c
1 #include "libm.h"
2
3 float logbf(float x)
4 {
5         if (!isfinite(x))
6                 return x * x;
7         if (x == 0)
8                 return -1/(x+0);
9         return ilogbf(x);
10 }