For example, these variables:
result (double)
a (double)
b (float)
c (float)
d (double)
A simple calculation:
result = a *
The floats will be upconverted to doubles. Explicitly cast the values.
ie if you want double as your result you would write:
result = a * double( b + c ) * d;
It is ALWAYS worth being explicit. It gets round misunderstandings like this and it is INSTANTLY obvious to anyone trying to use your code exactly what you mean.