Implicit conversion from float -5.846645367412137 to int loses precision