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

◆ scale_pow2_() [2/2]

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

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

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

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: