TITLE: Float versus double RESPONSE: leni@kwi.com (Leni Mayo), 2 Sep 93 Section 2.5.3 of the ARM states "The type of a floating constant is double unless explicitly specified by a suffix." This is relevant when writing overloaded functions having floating point arguments. Here's a code sample where the compilation error was a surprise: #include void print(short s) { cout << "s: " << s << endl; } void print(float f) { cout << "f: " << f << endl; } main() { print(0.8); } "float.cxx", line 8: error: ambiguous call: print ( double ) "float.cxx", line 8: choice of print()s: "float.cxx", line 8: print(short ); "float.cxx", line 8: print(float ); The error is explained in section 13.2 of the ARM, particularly pages 322-3. I infer a rule-of-thumb: "Use double arguments unless there is a particular reason to use float".