WholeLottaLove wrote:
I get the mechanics of flipping the signs when y is negative, but I guess I don't understand the logic.
If I take an absolute value of a number (always positive) then subtract from it an absolute value of a smaller number, which is negative how does that end up being X+Y? Are we looking just for the values of x and y, as opposed to the values of |x|-|y|?
If I take an absolute value of a number (always positive) then subtract from it an absolute value of a smaller number, which is negative how does that end up being X+Y? Are we looking just for the values of x and y, as opposed to the values of |x|-|y|?
----y--0------x--: y<0<x --> |x|-|y|=x+y and |x+y|=x+y --> x+y={x+y}. Correct.
x is greater than 0 => |x|=x
y is less than 0 => |y|=-y. You take -y from |y| because y<0
So |x|-|y|=x-(-y)=x+y
This is why |x|-|y| becomes x+y. If you want you can try with real numbers, example: x=5>0 and y=-3<0
|x|-|y|=|5|-|-3|=5-3=2
|x|-|y|=x+y=5-3=2