Knuth's power tree: Difference between revisions
Content added Content deleted
m (→{{header|Sidef}}: memoize the `path` function) |
m (changed a comment in the task's definition section.) |
||
Line 52: | Line 52: | ||
Note that for every even integer (in the power tree), one just squares the previous value. |
Note that for every even integer (in the power tree), one just squares the previous value. |
||
For an odd integer, |
For an odd integer, multiply the previous value with an appropriate odd power of <big>X</big> (which was previously calculated). |
||
For the last multiplication in the above example, it would be <big>(43-40)</big>, or <big>3</big>. <br> |
For the last multiplication in the above example, it would be <big>(43-40)</big>, or <big>3</big>. <br> |
||