I think you know about Math.Remainder operation of Small Basic. But the detail seems not so popular.
Usually, this function is used for natural numbers. But it can be used for such as negative numbers or decimal numbers.
Small Basic doesn't have Math.Int operation. But old BASIC and some other languages have this function. Following code shows about Int operation.
Using Int, we can write following identical equation.
dividend = Int(dividend / divisor) * divisor + Math.Remainder(dividend, divisor)
You can confirm the equation above with following code.
And in order to understand Math.Remainder more deeply, please look at following graph y = Math.Remainder(x, -1.5). This graph is drawn with a program RQX345-1,
We can also write following identical equation.
Math.Remainder(dividend, divisor) = Math.Remainder(dividend, -divisor)
Following TechNet Wiki article contains graphs such as Math.Floor(x), Math.Ceiling(x), and Math.Remainder(x, 2).