cast ratio value to float