The print out of float which is casted to double changes. 
e.g. for f = 125.32 when cast to double the print out is 125.31999969482422. 

If it doesn't matter that the print out changes, casting float to double should be fine.