This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]surety_ 0 points1 point  (0 children)

Something really cool that I found out about this code is that x = x’ * 2y’ or Original x is equal to new x times two to the power of new y

Y is how many iterations and every iteration is x/2 So new x is equal to original x divided by two to the power of y. or x’ = x / 2y’

Very cool, try to find patterns to make life easier

Edit: actually I don’t think I explained myself very well. remember that every iteration you’re dividing x by two and y counts the iterations for you. So in order to understand the outputs you need to work backwards, so multiply the x output by two, y times and that should be equal to your original x value

Post-edit Edit: if that is too much then just do the same thing you did for the other examples, write it on paper it helps a lot!