ΣSigmaStudio Ask AI Русский Log in

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

Processors & DSP CalumJ Apr 8, 2021 00:00 2 replies Original on forum ↗
Thread Summary

Thread Summary

The user asked about the word length of a double variable on ADSP-21489 in CCES. The final answer states that by default, double is a 32-bit single precision float, but using long double or the -double-size-64 switch can achieve 64-bit double precision. The user confirmed this solution was helpful.
AI Generated Content
Subscribe
CalumJ Question
Apr 8, 2021 00:00

Hello,

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

Thanks,

Calum

StuartS Reply
Apr 8, 2021 00:00

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.

Regards,
Stuart.

CalumJ Reply
Apr 26, 2021 00:00

Great, thank you Stuart