Part Number: TMS320F280049
Hello,
for some calculations in my project I need to work with complex numbers. I am working in CCS Version: 11.0.0.00012 with the compiler TI v21.6.0.LTS1. The microcontroller F280049 has a CPU-Clock of 96 MHz.
Using the header <complex.h>, there are built-in functions to calculate e.g. the argument, the absolute value or the square root of a complex number. But those functions seem to be highly inefficient.
For example:
When I use cargf(x) to calculate the argument of x, I need around 13 µs. But when I use atan2f(cimagf(x), crealf(x)) instead, it takes less than 1 µs.
I get similar results when using cabsf etc.So now I am wondering, why there is such a difference in the time.
Is it wrong to use these functions?
Do I maybe need to set something in the project properties, such that the compiler translates the function calls to the correct instructions?
Kind regards,
Michael
