Declaring a variable as a Double in CCES for ADSP-21489


I have a simple question and looking for a simple answer.

I am developing a floating point audio processing platform in CCES to be implemented on ADSP_21489.

I would like to know what word length is stored when declaring a variable as a double on a 32-bit dsp? See example of "out" variable declared below:

    // Process at single precision 
    float out;
    // Process at double precision? 
    double out;

Does it store it as:

- 1 x 32-bit float?

- 2 x 32-bit float?

- 1 x 40-bit float?

- Or none of the above



  • 0
    •  Analog Employees 
    on Apr 8, 2021 11:51 AM 2 days ago

    Hi Calum,

    By default double is a 32-bit/word single precision float. You can use long double to get 64-bit floats or use the -double-size-64 switch to change the double type to be 64-bit/double word.

    Search for "Floating-Point Data Size" in the CCES help to get more detail. Include the quotes in your search to get the best result.