blob: 9c42fc7a9fd6bc7d5d2b85f357326b294d209889 [file] [log] [blame]
#include <math.h>
float logbf(float x) {
if (!isfinite(x))
return x * x;
if (x == 0)
return -1 / (x * x);
return ilogbf(x);
}