in reply to Integers sometimes turn into Reals after substraction

Running your code under Perl 6 displays the following output for the last line:
x1=256080, x2=258160, diff=2080
And you can even compare $diff with 2080:
say $diff == 2080; # -> True
The reason for the difference is that Perl 6 is not using floats for such calculations, but rationals, so that 4/25 is not stored internally as 0.16, but as 4/25, i.e. a numerator and a denominator.