In C, floating constants are of type double . Try:
float lfResult = 19.893196f; if(lfResult == 19.893196f) ^
Thus, the constant 19.893196 has a higher accuracy than lfResult .
6.4.4.2 - 4
Unsuf fixed fl oating constant has type double . If it satisfies the letter f or F, it is of type float. If it is satisfied with the letter l or L, it is of type long double.
source share