MPC5744P, double and float

显示  仅  | 搜索替代 

MPC5744P, double and float

347 次查看
Contributor I

NXP engineer,

We use the S32DS complier and MPC5744P. And we found the constant 1.0f in equation(1) is used as 32-bit foat which is supported by hardware, but the 1.0 in equation(2) is used as 64-bit double( SW emulated). So the caculation speed of the equation(2) is much slower than equation(1).

float y,x;

y = 1.0f*x; (1)
y= 1.0*x; (2)

Because our application software has many float constants without "f", and the float constants in application are not easy to be revised one by one.  So the caculation speed is slow. Are there any method to treat "1.0" as "1.0f", so we can improve the caculation speed. THANKS!

0 项奖励
1 回复

344 次查看
NXP TechSupport
NXP TechSupport

It seems following option is capable to do it:



0 项奖励