我有两对数字。假设我有(A,B)和(X,Y) 问题是:
if
A-B = X-Y and
A+B = X+Y and
A/B = X/Y and
A*B = X*Y
我可以得出结论A = X和B = Y吗?
答案 0 :(得分:0)
我相信:
A-B = X-Y so
A = X-Y+B and
B = -X+Y+A so if
A+B=X+Y then
A-X+Y+A=X+Y becomes
2A=2X or A=X
and if
A+B=X+Y then
X-Y+B+B=X+Y becomes
2B=2Y or B=Y
答案 1 :(得分:0)
取决于数字类型。对于float
,您无法得出A = X
和B = Y
。
假设A = 1; B = Positive Infinity; X = 2; Y = Positive Infinity;
然后A-B = X-Y = Negative Infinity;
A+B = X+Y = Positive Infinity;
A/B = X/Y = 0;
A*B = X*Y = Positive Infinity;