Is it possible to simulate a floor() function with elementary arithmetic? I'm using a "programming language" that only allows basic operations: addition, subtraction, multiplication, and division.
Is it possible to emulate a floor function (i.e. drop the decimals a number) by using only those operators? I'm only interested in positive numbers
Edit: Here's the documentation describing what's possible (which is only elementary arithmetic)

If you can use a loop and extra variables, you can repeatedly subtract one until left with only the decimal part.
Something like:
floor(x):
floor = 0
While x >= 1
    floor += 1
    x -= 1
End While

Not the greatest, and will take a long time for large numbers, but it could be tweaked.
It also won't work for negative values, but that's easily fixed.
