I meant to post what I posted.
Then you can't know as much math as me. Then my question is: why are you trying to correct me?
The expressions shackstar, Zhuge, and I posted are all equivalent. Furthermore, they are the correct solution to the problem you posted. If you're getting incorrect results when plugging them into your code, then the problem you posted isn't equivalent to the problem in your code.
z = (((x + (y + 1)) * (y + 1)) - ((y + 1) * 2))
(Removing redundant parentheses.)
z = (x + y + 1) * (y + 1) - (y + 1) * 2
(Replacing x = z/(y+1)-y+1)
z = ((z / (y + 1) - y + 1) + y + 1) * (y + 1) - (y + 1) * 2
z = (z / (y + 1) + 2) * (y + 1) - (y + 1) * 2
z = z * (y + 1) / (y + 1) + 2 * (y + 1) - (y + 1) * 2
z = z + 2 * (y + 1) - (y + 1) * 2
z = z
I have written a function specifically to confine any numbers returned by the equations within require parameters. |
Oh, I've got to see that.