@@ -174,6 +174,19 @@ Word32 BASOP_Util_InvLog2( Word32 x )
returnretVal;
}
Word32BASOP_Util_Log10(Word32x,Word16e)
{
Word32res=BASOP_Util_Log2(x);
res=L_add(Mpy_32_32(res,646456993/* log10(2) in Q31 */),Mpy_32_32(L_shl(e,25),646456993/* log10(2) in Q31 */));// Adjusting for the exponent mismatch: multiplying first so as to avoid saturation
returnres;
}
Word32BASOP_Util_Loge(Word32x,Word16e)
{
Word32res=BASOP_Util_Log2(x);
res=L_add(Mpy_32_32(res,1488522235/* loge(2) in Q31 */),Mpy_32_32(L_shl(e,25),1488522235/* loge(2) in Q31 */));// Adjusting for the exponent mismatch: multiplying first so as to avoid saturation
returnres;
}
Word16BASOP_Util_Add_MantExp/*!< Exponent of result */