\hypertarget{a00875_source}{}\doxysection{AAX\+\_\+\+Fast\+Pow.\+h}
\label{a00875_source}\index{AAX\_FastPow.h@{AAX\_FastPow.h}}
\mbox{\hyperlink{a00875}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ \ Copyright\ 2009-\/2015,\ 2023-\/2024\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ This\ file\ is\ part\ of\ the\ Avid\ AAX\ SDK.}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ The\ AAX\ SDK\ is\ subject\ to\ commercial\ or\ open-\/source\ licensing.}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ \ By\ using\ the\ AAX\ SDK,\ you\ agree\ to\ the\ terms\ of\ both\ the\ Avid\ AAX\ SDK\ License}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ Agreement\ and\ Avid\ Privacy\ Policy.}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ \ AAX\ SDK\ License:\ https://developer.avid.com/aax}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ Privacy\ Policy:\ https://www.avid.com/legal/privacy-\/policy-\/statement}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ Or:\ You\ may\ also\ use\ this\ code\ under\ the\ terms\ of\ the\ GPL\ v3\ (see}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ \ www.gnu.org/licenses).}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ \ THE\ AAX\ SDK\ IS\ PROVIDED\ "{}AS\ IS"{}\ WITHOUT\ ANY\ WARRANTY,\ AND\ ALL\ WARRANTIES,\ WHETHER}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ \ EXPRESSED\ OR\ IMPLIED,\ INCLUDING\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ PURPOSE,\ ARE}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ \ DISCLAIMED.}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00042\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ }
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#ifndef\ \_AAX\_FASTPOW\_H\_}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#define\ \_AAX\_FASTPOW\_H\_}}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#include\ <cmath>}\ }
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#if\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00054\ \textcolor{keyword}{namespace\ }std\ \ \{using\ ::powf;using\ ::log10f;using\ ::fabsf;\}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00542}{AAX.h}}"{}}\ \ \ \textcolor{comment}{//\ For\ AAX\_RESTRICT}}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00058\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{a00948}{AAX}}}
\DoxyCodeLine{00059\ \{}
\DoxyCodeLine{00060\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \_2p23\ =\ 8388608.0f;}
\DoxyCodeLine{00061\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{a00948_a4e6fcac015bb083018e8897563966cf6}{kPowExtent}}\ =\ 9;\ \ \ \ \textcolor{comment}{//\ 9\ results\ in\ \string~-\/80dB\ cancellation}}
\DoxyCodeLine{00062\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{a00948_a59f1ab59ea51ed94f87e8d935870df9e}{kPowTableSize}}\ =\ 1\ <<\ \mbox{\hyperlink{a00948_a4e6fcac015bb083018e8897563966cf6}{kPowExtent}};}
\DoxyCodeLine{00063\ \ \ \ \ }
\DoxyCodeLine{00078\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ PowFastSetTable(}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ pTable,}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ precision,}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ extent,}
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ isRound)}
\DoxyCodeLine{00083\ \{}
\DoxyCodeLine{00084\ \ \ \ \textcolor{comment}{//\ step\ along\ table\ elements\ and\ x-\/axis\ positions}}
\DoxyCodeLine{00085\ \ \ \ \textcolor{keywordtype}{float}\ zeroToOne\ =\ !isRound\ ?}
\DoxyCodeLine{00086\ \ \ \ \ \ \ 0.0f\ :\ (1.0f\ /\ (\textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}(1\ <<\ precision)\ *\ 2.0f));}
\DoxyCodeLine{00087\ \ \ \ \textcolor{keywordflow}{for}(\ \textcolor{keywordtype}{int}\ i\ =\ 0;\ \ i\ <\ (1\ <<\ extent);\ \ ++i\ )}
\DoxyCodeLine{00088\ \ \ \ \{}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \textcolor{comment}{//\ make\ y-\/axis\ value\ for\ table\ element}}
\DoxyCodeLine{00090\ \ \ \ \ \ \ pTable[i]\ =\ std::powf(\ 2.0f,\ zeroToOne\ );}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ \ \ zeroToOne\ +=\ 1.0f\ /\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{float}\textcolor{keyword}{>}(1\ <<\ precision);}
\DoxyCodeLine{00093\ \ \ \ \}}
\DoxyCodeLine{00094\ \}}
\DoxyCodeLine{00095\ \ \ \ \ }
\DoxyCodeLine{00141\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ PowFastLookup(}
\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \ \ val,}
\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \ \ ilog2,}
\DoxyCodeLine{00144\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ tableH,}
\DoxyCodeLine{00145\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ tableL)}
\DoxyCodeLine{00146\ \{}
\DoxyCodeLine{00147\ }
\DoxyCodeLine{00148\ \ \ \ \ \textcolor{comment}{//\ build\ float\ bits}}
\DoxyCodeLine{00149\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ i\ =\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{int}\textcolor{keyword}{>}(\ (val\ *\ (\_2p23\ *\ ilog2))\ +\ (127.0f\ *\ \_2p23)\ );}
\DoxyCodeLine{00150\ }
\DoxyCodeLine{00151\ \ \ \ \ \textcolor{comment}{//\ replace\ mantissa\ with\ combined\ lookups}}
\DoxyCodeLine{00152\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ t\ \ =\ tableH[(i\ >>\ 14)\ \&\ 0x1FF]\ *\ tableL[(i\ >>\ 5)\ \&\ 0x1FF];}
\DoxyCodeLine{00153\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ \ \ it\ =\ (i\ \&\ 0xFF800000)\ |}
\DoxyCodeLine{00154\ \ \ \ \ \ \ (*\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{int}*\textcolor{keyword}{>}(\ \&t\ )\ \&\ 0x7FFFFF);}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{comment}{//\ convert\ bits\ to\ float}}
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{float}*\textcolor{keyword}{>}(\ \&it\ );}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00159\ \}}
\DoxyCodeLine{00160\ }
\DoxyCodeLine{00172\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ Pow2FastLookup(}
\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \ \ val,}
\DoxyCodeLine{00174\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ tableH,}
\DoxyCodeLine{00175\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ tableL)}
\DoxyCodeLine{00176\ \{}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00178\ \ \ \ \ \textcolor{comment}{//\ build\ float\ bits}}
\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ i\ =\ \textcolor{keyword}{static\_cast<}\textcolor{keywordtype}{int}\textcolor{keyword}{>}((val\ +\ 127.0f)\ *\ \_2p23);}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \ \ \ \ \textcolor{comment}{//\ replace\ mantissa\ with\ combined\ lookups}}
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ t\ \ =\ tableH[(i\ >>\ 14)\ \&\ 0x1FF]\ *\ tableL[(i\ >>\ 5)\ \&\ 0x1FF];}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ \ \ it\ =\ (i\ \&\ 0xFF800000)\ |}
\DoxyCodeLine{00184\ \ \ \ \ \ \ (*\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{int}*\textcolor{keyword}{>}(\ \&t\ )\ \&\ 0x007FFFFF);}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{comment}{//\ convert\ bits\ to\ float}}
\DoxyCodeLine{00187\ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{float}*\textcolor{keyword}{>}(\ \&it\ );}
\DoxyCodeLine{00188\ }
\DoxyCodeLine{00189\ \}}
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ }
\DoxyCodeLine{00193\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ kMantissaBitSize\ =\ 23;}
\DoxyCodeLine{00194\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ kExpBias\ =\ 127;}
\DoxyCodeLine{00195\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ kLogMantissaMSBs\ =\ 9;}
\DoxyCodeLine{00196\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ kLogTableSize\ =\ (1\ <<\ kLogMantissaMSBs)\ +\ 1;\textcolor{comment}{//\ 513;\ \ \ \ }}
\DoxyCodeLine{00197\ }
\DoxyCodeLine{00208\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ LogFastSetTable(}
\DoxyCodeLine{00209\ \ \ \ \ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ logTable,\ }
\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keywordtype}{int}\ tableSize\ =\ kLogTableSize)}
\DoxyCodeLine{00211\ \{}
\DoxyCodeLine{00212\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ kInv\ =\ 1.0f/float(tableSize\ -\/\ 1);\ \textcolor{comment}{//\ 0.001953125}}
\DoxyCodeLine{00213\ \ \ \ \ \textcolor{keywordtype}{float}\ mantissaVal\ =\ 1.0f;\ \ \ \textcolor{comment}{//Start\ here.}}
\DoxyCodeLine{00214\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ invLog10Base2\ =\ 1.0f\ /\ std::log10f(2.0f);}
\DoxyCodeLine{00215\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ j\ =\ 0;\ j\ <\ tableSize;\ j++)}
\DoxyCodeLine{00216\ \ \ \ \ \{}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ logTable[j]\ =\ std::log10f(mantissaVal)\ *\ invLog10Base2;\ \textcolor{comment}{//By\ log\ equivalency:\ log2(x)\ =\ log10(x)/log10(2)}}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ mantissaVal\ +=\ kInv;}
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00220\ \ \ \ \ \}}
\DoxyCodeLine{00221\ }
\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00223\ \}}
\DoxyCodeLine{00224\ }
\DoxyCodeLine{00243\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ kMantMSBs>}
\DoxyCodeLine{00244\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ LogFloatToExpMantissa(}
\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keywordtype}{float}\ number,\ }
\DoxyCodeLine{00246\ \ \ \ \ \textcolor{keywordtype}{int}\ *\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ outExp,\ }
\DoxyCodeLine{00247\ \ \ \ \ \textcolor{keywordtype}{int}\ *\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ outMant,\ }
\DoxyCodeLine{00248\ \ \ \ \ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ fract)}
\DoxyCodeLine{00249\ \{\ \ \ }
\DoxyCodeLine{00250\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ mantissaSize\ =\ 1\ <<\ (kMantissaBitSize\ -\/\ kMantMSBs);}
\DoxyCodeLine{00251\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ invMantissaSize\ =\ 1.0f/(float)mantissaSize;}
\DoxyCodeLine{00252\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ intEquiv\ =\ *\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{int}*\textcolor{keyword}{>}(\&number);}
\DoxyCodeLine{00253\ }
\DoxyCodeLine{00254\ \ \ \ \ \textcolor{comment}{//bool\ isNegative\ =\ (result\ \&\ 0x80000000)\ !=\ 0;\ //Sign\ bit}}
\DoxyCodeLine{00255\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ exponent\ \ \ \ \ \ =\ (intEquiv\ \&\ 0x7f800000)\ >>\ 23;\ \textcolor{comment}{//Exponent\ bits}}
\DoxyCodeLine{00256\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ mantissa\ \ \ \ \ \ =\ \ intEquiv\ \&\ 0x007fffff;\ \textcolor{comment}{//Mantissa\ bits.}}
\DoxyCodeLine{00257\ }
\DoxyCodeLine{00258\ \ \ \ \ \textcolor{comment}{//\ 0\ 000|0\ 000|0\ 1\ 010|\ 0000\ 0000\ 0000\ 0000\ 0000}}
\DoxyCodeLine{00259\ \ \ \ \ \textcolor{comment}{//\ 0111\ 1111\ 1000\ 0000\ 0000\ 0000\ 0000\ 0000\ =\ 7f800000\ (Exp)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }}
\DoxyCodeLine{00260\ \ \ \ \ \textcolor{comment}{//\ 0000\ 0000\ 0111\ 1111\ 1111\ 1111\ 1111\ 1111\ =\ 007fffff\ (Mant)}}
\DoxyCodeLine{00261\ }
\DoxyCodeLine{00262\ \ \ \ \ *outExp\ =\ exponent\ -\/\ kExpBias;\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//Compensate\ for\ exponent\ bias\ for\ caller.}}
\DoxyCodeLine{00263\ \ \ \ \ \textcolor{comment}{//To\ do:\ add\ halfLSBShifted\ to\ mantissa\ before\ shifting;\ *outMant\ =\ (mantissa\ +\ halfLSBShifted)\ >>\ (kMantissaBitSize\ -\/\ mantMSBs)}}
\DoxyCodeLine{00264\ \ \ \ \ *outMant\ =\ mantissa\ >>\ (kMantissaBitSize\ -\/\ kMantMSBs);\ \ \ \ \ \ \textcolor{comment}{//Shift\ to\ provide\ only\ mantMSBs\ for\ log\ LUT.}}
\DoxyCodeLine{00265\ \ \ \ \ \textcolor{comment}{//\ Provide\ a\ linear\ interpolation\ fraction}}
\DoxyCodeLine{00266\ \ \ \ \ *fract\ =\ (float)(mantissa\ \&\ (mantissaSize\ -\/\ 1))\ *\ invMantissaSize;}
\DoxyCodeLine{00267\ }
\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00269\ \}\ \ \ \ \ }
\DoxyCodeLine{00270\ }
\DoxyCodeLine{00284\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ kPrecision>}
\DoxyCodeLine{00285\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ LogFastLookup(}
\DoxyCodeLine{00286\ \ \ \ \ \textcolor{keywordtype}{float}\ num,\ }
\DoxyCodeLine{00287\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}*\ \textcolor{keyword}{const}\ AAX\_RESTRICT\ logTable)}
\DoxyCodeLine{00288\ \{}
\DoxyCodeLine{00289\ }
\DoxyCodeLine{00290\ \ \ \ \ \textcolor{keywordtype}{int}\ exponent,\ mantissa;}
\DoxyCodeLine{00291\ \ \ \ \ \textcolor{keywordtype}{float}\ fract;}
\DoxyCodeLine{00292\ }
\DoxyCodeLine{00293\ \ \ \ \ AAX::LogFloatToExpMantissa<kPrecision>(num,\ \&exponent,\ \&mantissa,\ \&fract);}
\DoxyCodeLine{00294\ }
\DoxyCodeLine{00295\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ mantLog1\ =\ logTable[mantissa];}
\DoxyCodeLine{00296\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ mantLog2\ =\ logTable[mantissa+1];}
\DoxyCodeLine{00297\ }
\DoxyCodeLine{00298\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ logOfNum\ =\ (mantLog1\ *\ (1.0f\ -\/\ fract)\ +\ fract\ *\ mantLog2)\ +\ exponent;}
\DoxyCodeLine{00299\ \ \ \ \ \textcolor{keywordflow}{return}\ logOfNum;}
\DoxyCodeLine{00300\ \}\ \ }
\DoxyCodeLine{00301\ }
\DoxyCodeLine{00302\ }
\DoxyCodeLine{00303\ }
\DoxyCodeLine{00304\ \}\ \textcolor{comment}{//\ namespace\ AAX}}
\DoxyCodeLine{00305\ }
\DoxyCodeLine{00306\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \#ifndef\ \_AAX\_FASTPOW\_H\_}}

\end{DoxyCode}
