MPC5744P, double and float

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5744P, double and float

583 Views
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 Kudos
Reply
1 Reply

580 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It seems following option is capable to do it:

davidtosenovjan_0-1660570297185.png

 

0 Kudos
Reply