This is actually a bug. The results with constants are evaluated by the compiler and are correct.
The problem with variables is that Blitz tries to optimize division by a power of 2, replacing it with a sign-preserving shift. This rounds the wrong direction for negative numbers.
No matter what you think about which way the rounding should go it is clear those three numbers should be the same. In fact they should all be zero.
The problem with variables is that Blitz tries to optimize division by a power of 2, replacing it with a sign-preserving shift. This rounds the wrong direction for negative numbers.
m1 = -1 Write " -1 divided by 7, 8, 9 = " Print ( m1 / 7 ) + ", " + ( m1 / 8 ) + ", " + ( m1 / 9 ) WaitKey
No matter what you think about which way the rounding should go it is clear those three numbers should be the same. In fact they should all be zero.