FastLED 3.10.6
Loading...
Searching...
No Matches

◆ scale_pow2_() [2/2]

float fl::detail::scale_pow2_ ( float p,
int k )
inline

Definition at line 106 of file math.cpp.hpp.

106 {
107 const int a = k / 2;
108 const int b = k - a;
109 FloatBits fa, fb;
110 fa.u = static_cast<u32>(a + 127) << 23;
111 fb.u = static_cast<u32>(b + 127) << 23;
112 return (p * fa.f) * fb.f;
113}

References fl::detail::FloatBits::f, fl::FL_NO_EXCEPT, and fl::detail::FloatBits::u.

Referenced by exp_reduced_(), and exp_reduced_().

+ Here is the caller graph for this function: