I have a doubt about precision and speed in division between double and float.
e.g:
double a;
a=myfun(); //returns a number with lots of decimals
float b=5.0;
double result=a/b;
Would the result change if b would be double?
Does it take more time to compute if they are not doubles (because of changing the size of the float for fitting the double size)?
Since the value is 0.5, the result should not change. If it was a different value, it might change, because double has better precision then float.
Yes, it does. But the time to convert from float to double can be really neglected.