FastLED 3.10.8
Loading...
Searching...
No Matches

◆ fast_logf_approx()

float fl::fast_logf_approx ( float x)
inline

Definition at line 414 of file math.h.

414 {
415 union { float f; u32 i; } u;
416 u.f = x;
417 i32 e = static_cast<i32>(u.i >> 23) - 127;
418 u.i = (u.i & 0x007FFFFFu) | 0x3F800000u;
419 float m = u.f;
420 float t = m - 1.0f;
421 float log2m = t * (1.3327635f + t * (-0.3327635f));
422 return (static_cast<float>(e) + log2m) * 0.6931471805599453f;
423}
int x
Definition simple.h:92
static uint32_t t
Definition Luminova.h:55

References FL_NO_EXCEPT, t, and x.

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

+ Here is the caller graph for this function: