cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

24-Ruby II

## Ward No. 21: a+b is not equal b+a

3 REPLIES 3
23-Emerald II
(To:ValeryOchkov)

Interesting. The 'feature' has been there since at least Mathcad 11 (although giving a slightly different result than M15). Similar thing happens with the product operator.

Stuart

24-Ruby II
(To:StuartBruff)

Yes! a*b is not equal b*a

I hope I understand this error.

Mathcad's symbolic engine solves a quadratic equation and chooses not correct root.

And second.

I have seen in one Mathcad guide that in sum(f(i), i=a..b) b must be more than a always!

24-Ruby IV
(To:StuartBruff)

Computer math is not commutative as we operate on a finite set of numbers in contrary to the infinite real numbers and because of rounding errors done by decimal-binary-decimal conversion (which could be avoided by using BDC arithmetic).

The second example using the symbolic evaluation is quite different. Don' think that it's a bug. Rather Mathcad is not going to give you all possible solutions. If n is undefined Mathcad does not know wheter its going to sum UP or a sum DOWN, so its defaults to UP and gives you that solution. Only the last example below seems to be a bug, but the assume modifier never was reliable anyway.

WE

Correction: Even the last exemple has its logic. As the default seems to be that the upper limit is greater than or equal to the lower limit, the modifier n>=1 can only mean that n=1. Tricky!

Announcements
Check out the latest