Depends on this numerical architecture:
you can use the "Two compliments" mechanism of x86 / x64 architecture,
for example, if the signed numbering scheme is cyclic.
f(0 < x < 32768) = x f(32769 < x < 65535) = x - 65536
Then you can use:
dec(a) { loop(65535 [= 2^16-1]) { inc(a) } }
.
riddle decision how
(ab) { loop(b) { dec(a) } }
Depending on the signed scheme, the add constant may change, the same for short, long, large integer types.
Hope this is good :) Good luck.
source share