Closed vfjpl closed 1 year ago
Do we enable -Wdouble-promotion
by default? Aren't most modern CPUs implementing doubles in hardware? It looks like this change is backwards because it would cater to older hardware instead?
All of this calculations was already done in floats. double literals just caused unnecessary conversion from float to double and back to float. "It looks like this change is backwards because it would cater to older hardware instead?" No, why is that? New hardware works with floats perfectly well. floats are plenty precise for our use.
No, why is that? New hardware works with floats perfectly well. floats are plenty precise for our use.
You're right, not sure what I was thinking here when making that comment.
Use float literals to perform more calculation in float instead of performing implicit conversion to double and back to float.
This fixes warnings with -Wdouble-promotion