1 2 3 4 5 6 7 8 9 10
#include "libm.h" float logbf(float x) { if (!isfinite(x)) return x * x; if (x == 0) return -1/(x+0); return ilogbf(x); }