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.

Compiler/DRA72XEVM: Floating-point increase precision C66x

Part Number: DRA72XEVM

Tool/software: TI C/C++ Compiler

Hi,

I am looking into increasing precision on various math operations on a c6x-dsp.I found that the floating-point control registers FADCR, FAUCR and FMCR mentions denormalized numbers. The manual SPRUGH7 gives a brief explaination on the content of these registers.

I would for example want
32bit float operation 1.0e-37 *0.01 ~= 0 and
64bit float operation 1.0e-307 *0.01 ~= 0.

Is this possible on a c66x dsp?

Thanks,
Joakim

  • Hi Joakim,

    You can increase the floating point precision of certain operations by using Newton-Raphson method.
    For example, the RCPSP instruction in C66x which provides the reciprocal (1/x) of single precision numbers is accurate upto 8th bit of mantissa. We can apply NR method twice to increase precision from 8-bit to 16-bit and to 32-bit (Single Precision).

    Also you could take a look at MATHLIB for numerous optimized math functions
    http://www.ti.com/tool/MATHLIB

    I will get back to you on Floating point control registers.

    Regards,
    Shyam
  • Hi Joakim,

    Just wanted to update that C66x DSP supports Flush-To-Zero floating point mode. So what you are trying with denormalized numbers should be doable.

    I would for example want
    32bit float operation 1.0e-37 *0.01 ~= 0 and
    64bit float operation 1.0e-307 *0.01 ~= 0.

    Regards,
    Shyam
  • Thanks Shyam,
    Only Flush-To-Zero floating point mode on the c66x-DSP, and where it is needed, add extra newton-rhapson iterations (for 1/x, 1/sqrt(x)... etc). That answered my question.

    Regards
    Joakim
  • Just to be specific, 

    The C66x DSP supports only "Flush-to-zero" mode instead of "IEEE 754" mode for handling subnormal numbers.

    For operations such as (1/x, 1/sqrt(x), etc..) Newton-Raphson method can be used to improve precision.

    Regards,
    Shyam