# Talk:Numberwang

I decided to make a table of the effect of the command 3 subprogram for various starting step counts. This only considers the usual step count increment and not special effects of the 2 and 3 commands, which will therefore involve switching between rows as well as the weird effect of non-integer jumps.

```S.c.
0    3  0/1  0   0   3   3   0  0/1
1    0   1   1   1   0   0  0/1  1
2    1   2   2   2  0/1 0/1  1   2
3    2   3   3   3   1   1   2   3
4    3   0   0   0   2   2   3   0
5    0   1  0/1 0/1  3   3   0   1
6   0/1  2   1   1   0   0   1   2
7    1   3   2   2   1   1   2   3
8    2   0   3   3   2   2   3   0
```

(EDIT: I realized the digital root of most numbers that are 0 (mod 9) is customarily 9, not 0, which would give a command 1, not 0. Table edited to show this. Fortunately this does not change where there are any 2 or 3 commands. --Ørjan 22:02, 19 July 2011 (UTC))

As you can see, with starting step count 1 (mod 9) only 0 and 1 commands are performed, which means that in this phase the effects of the program is entirely reversible. This may mean that it is still not too hard to use the 3 command productively in Numberwang.

As for the other rows, the specification is not clear about exactly when the step counter changes during the full execution of a 3 command (in particular, whether it is incremented before entering the subprogram, and what it will be when resuming the original program), and I don't understand how a non-integer jump works (precisely which numbers are interpolated, and is the "subsequent command" the latter of the two interpolated ones, or the next one after that?), so I have not been able to analyze those yet. --Ørjan 23:07, 15 July 2011 (UTC)

The step counter increments after every command, including the one to enter the subpogram. It never goes down, until the main program halts. The way non-integer jumps are interpolated is as follows: (command(floor(location))*(1-(location mod 1)))+(command(ceiling(location))*(location mod 1)). Tell me if that works. And the next command is the one after that. Taneb 06:28, 16 July 2011 (UTC)