This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

64bit resolution sinus calculation

Hello,
customer ask for 64bit sinus function. He wants to save flash memory and remove the twiddle factor constants out of the flash memory. The idea is to generate this constants in the start up phase. He needs high resolution (64bit). Do we such a sinus function?

Regards
Holger

  • Holger,

    It may be possible for the customer to extract the "sin.c" source function from the zipped up library source file "rtssrc.zip" that comes withc ompiler and convert this to generate 64-bit sinus value.

    on C2000 compiler, a 64-bit float is defined as "long double" but the sinus source uses the definition "double". On C2000 compiler a "double" is treated like a "float" or 32-bit value.

    I have requested that we support 64-bit trig functions on future compilers, but for the moment the customer will need to play with the above.

    Cheers,

    Alex T.

     

  • Hello Alex,
    thanks for this info.
    In the meantime the customer is looking on a different method to generate high resolution Twiddle factors and uses the _IQ30sinPU function which uses a Uint value (2^30==2*PI) instead of a radiant. The radiant value was not exact enough.

    Normal 0 21 false false false DE X-NONE X-NONE

    Regards
    Holger