Implicit conversion from float -5.818505338078296 to int loses precision