cast doubles to float properly