MPC5744P, double and float

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5744P, double and float

542 次查看
778939159
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 回复

539 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

It seems following option is capable to do it:

davidtosenovjan_0-1660570297185.png

 

0 项奖励
回复