Tool/software:
Hi Team,
What different between (0.01F) and (float)0.01 on F28388 when --float_support=fpu32?
My customer said when use (0.01F) in code, the complier will consider it as double, the calculation will slow down.
Best Regards,
Zane
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.
Tool/software:
Hi Team,
What different between (0.01F) and (float)0.01 on F28388 when --float_support=fpu32?
My customer said when use (0.01F) in code, the complier will consider it as double, the calculation will slow down.
Best Regards,
Zane
Zane,
Using 0.01F will cause the floating-point constant to be interpreted as a single-precision constant, so the calculation will NOT slow down with FPU32.
Thanks,
Sira