Hi,
I use C5535 to develop some algorithm, which need "log", "sqrt" and "power",
but I find they have to change to Q15 format from fixed point integer,
and transform back after using DSPLIB, for example to get sqrt(100):
//test root "sqrt_16()" by using int <-> q15 conversion temp_x = 100; temp_f = 1; temp_f /= temp_x; //turn integer value to reciprocal temp_f *= 32768; //convert to Q15 from integer temp_log_in = (short)temp_f; sqrt_16(&temp_log_in, &temp_log_out, 1); temp_f2 = temp_log_out; temp_f2 /= 32768; //convert to integer from Q15 temp_y = 1; temp_y /= temp_f2; //get output integer value from reciprocal
It cost too much CPU cycle, and the result will not be precise when input value get much bigger.
Is there any good solution to transfer integer to Q15, or using these DSPLIB more efficient?
Best regards
Eddie