menu
It seems that what you actually expect from the numbers is:
8.9 > 8.10 and this is true with the decimal numbers, but when talking about the version of a software this is not true because each number after the dot have individual meaning resulting that the version 8.9 < 8.10 
So the operation
(3 - 10) % 27
result in 20, because when you insert a negative number in the first operand the modulus return a positive result changing this
-7 % 27
to this
-7 + 27
resulting in 20