On Friday, 5 August 2016 at 08:43:48 UTC, deadalnix wrote:
On Friday, 5 August 2016 at 08:17:00 UTC, Ilya Yaroshenko wrote:1. Could you please provide an assembler example with clang or recent gcc?I have better: compile your favorite project with -Wdouble-promotion and enjoy the rain of warnings.But try it yourself: float foo(float a, float b) { return 3.0 * a / b; }
Your example is just a speculation. 3.0 force compiler to convert a and b to double. This is obvious.
