Floor is not working as I expected for negative numbers