cosmopolitan/libc/math/logbf.c

11 lines
140 B
C
Raw Normal View History

2020-06-15 14:18:57 +00:00
#include "libc/math/math.h"
float logbf(float x)
{
if (!isfinite(x))
return x * x;
if (x == 0)
return -1/(x*x);
return ilogbf(x);
}