I\'m currently working on a C++ project which does numerical calculations. The vast, vast majority of the code uses single precision floating point values and works perfectl
If you read 2.13.3/1 you'll see:
The type of a floating literal is double unless explicitly specified by a suffix. The suffixes f and F specify float, the suffixes l and L specify long double.
In other words there is no suffix to specify double
for a literal floating point constant if you change the default to float
. Unfortunately you can't have the best of both worlds in this case.