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.

TMS320F28377D: Differences between float and double

Part Number: TMS320F28377D

Hello, 

I know that float and double are both 32-bit data types in TMS320F28377d. 

  1. What are the differences between double and float?

     2.  Are they both processed using fpu? Can the processing time vary?

 

Thank you for your help. 

  • COFF ABI
    • float and double are both 32-bit single-precision floating-point types.
    • This makes the double type essentially an alias for float, saving memory and potentially offering faster performance on FPU32-only hardware, as all operations are 32-bit.
    • Floating-point constants written without an f suffix (e.g., 42.2) are treated as 32-bit values, consistent with the double definition in this ABI. 
    EABI
    • float is a 32-bit single-precision type, while double is a 64-bit double-precision type.
    • This aligns with industry-standard C/C++ definitions (IEEE 754 standard).
    • Code compiled for EABI uses 64-bit operations for double variables. If the target processor only has a 32-bit FPU (FPU32), these 64-bit operations must be emulated in software, resulting in slower execution.
    • Floating-point constants without an f suffix are treated as 64-bit double by the compiler, which can implicitly introduce slow, 64-bit operations into a codebase intended for 32-bit floats.