Hi,

Besides the fact that you can enable such optimization...

Thus, I never cared of writing i.e
float x = a * 0.1f
but I always wrote
float x = a / 10.f
trusting the compiler.

This article look at this specific case: https://doi.org/10.1145/103162.103163 (Page 29, section 3.2.3), it's old but describe some interesting things about float numbers.
Therefore, in this example is better to use x = a / 10.f :-)

Best,
Sebastian

Reply via email to