For those interested in the discussion within the crosspost, see
double to int conversion -- 3 simple lines of code -- prints wrong answer 1664 - why?

And some reading for those unfamiliar:...