If I have 2 floats and add them together, is the result a float? Or is a double? Or is it compiler defined behavior?
9.0f + 8.0f <--- is the result float, double or compiler defined behavior?
A citation of the correct place in the C specifications would be helpful, if possible.
Yes, the type is
float.C23x dr ยง 6.3.1.8 1
Although the type is
float, depending onFLT_EVAL_METHOD, the sum may have been calculated usingfloat,doubleorlong doublemath. This potentially has arithmetic impact on a larger/different valued expression. This part is "compiler implementation defined behavior".