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.

MSP-IQMATHLIB: __double_size to value '64'


When I use IQmathLib_IAR_MPY32_5xx_6xx_CPUX_large_code_large_data.lib, if I set __double_size to value '64', the compiler will produce a error.

The error is Module _atoIQN specifies that '__double_size' must be '32', but module main has the value '64'.

Why can't I set __double_size to value '64'?

If I need 64bit double, what should I do?

  • Hey User1880549,

    What exactly are you trying to do with the IQ Math library? Why are you wanting to change the double size to 64 bits?

    Also, Where are you setting the double size? Is it in the project setting?

  • Hello,

    Were you able to fix this issue? I'm going to close this thread for now, but feel free to respond if you still need some help.

  • My data ranges from 2.5 to 0.005, with an allowable error of 0.0001. Above requirements I think the accuracy is in 8-9 bits of valid figures. Because 32-bit floating-point numbers have only 6-7 bits of valid numbers, I would like to use 64-bit floating-point numbers.

    I use IAR for MSP430, Options->General Options->Target->Floating-point->Size of type->64 bits.

    Can I set a 64-bit floating point number somewhere else, and how?

  • Hello,

    The 32-bit IEEE-754 floating point format uses a 24-bit significand and should be more than sufficient for the data range and accuracy you provided.  Typically 64-bit floating point is too computationally expensive and the accuracy is significantly higher than what's needed for MSP430 applications (e.g. using 64-bit double precision math for 12-bit ADC samples is overkill).

    I'll investigate if there is a way to use the IQmath libraries in IAR with 64-bit double but it may not be supported.


    Brent Peterson

**Attention** This is a public forum