[[File:PietArithmaticInteger.png]]
command stack
in(int) A
duplicate AA
duplicate AAA
duplicate AAAA
duplicate AAAAA
in(int) BAAAAA
duplicate BBAAAAA
duplicate BBBAAAAA
duplicate BBBBAAAAA
duplicate BBBBBAAAAA
push 9 9BBBBBAAAAA
push 1 19BBBBBAAAAA
roll BBBBAAAABA
push 7 7BBBBAAAABA
push 1 17BBBBAAAABA
roll BBBAAABABA
push 5 5BBBAAABABA
push 1 15BBBAAABABA
roll BBAABABABA
push 3 3BBAABABABA
push 1 13BBAABABABA
roll BABABABABA
add (A+B)BABABABA
out(int) BABABABA
sub (A-B)BABABA
out(int) BABABA
mult (A*B)BABA
out(int) BABA
divide (A/B)BA
out(int) BA
mod (A%B)
out(int) NULL
push 1 1
exit
How rounding is handled is up to the interpreter, but I believe the intent was round towards 0.