Friday, November 21, 2014

Floating-point Literals

1.f is a valid float.

It is not the same as 1.0, because 1.f is a float and 1.0 is a double. 1.0 is a double because double is the C/C++ default floating-point type. 1.d is a double.

For a lot more detail, see: