FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fast_logf_approx()

float fl::fast_logf_approx ( float x)
inline

Definition at line 406 of file math.h.

406 {
407 union { float f; u32 i; } u;
408 u.f = x;
409 i32 e = static_cast<i32>(u.i >> 23) - 127;
410 u.i = (u.i & 0x007FFFFFu) | 0x3F800000u;
411 float m = u.f;
412 float t = m - 1.0f;
413 float log2m = t * (1.3327635f + t * (-0.3327635f));
414 return (static_cast<float>(e) + log2m) * 0.6931471805599453f;
415}
int x
Definition simple.h:92
static uint32_t t
Definition Luminova.h:55

References FL_NOEXCEPT, t, and x.

Referenced by fl::audio::detector::Vocal::computeBroadSpectralFeatures().

+ Here is the caller graph for this function: