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

Only in Mathcad 15

Re: Only in Mathcad 15

I think the expression 2(2+2) is being treated by MathCad as a monomial (a single expression), like 2y

2 x (2+2) would be treated as a polynomial.

 

So, if y=(2 + 2) Then 8 / 2y = 1, and 8 / 2 x y = 16 (PEMDAS left to right operation)

Re: Only in Mathcad 15


@ptc-3007533 wrote:

I think the expression 2(2+2) is being treated by MathCad as a monomial (a single expression),


Yes, and this is what I consider a bug because there should be no difference between an explicit and an implicit multiplication.

BTW, real Mathcad does not show this bug:B.png

Re: Only in Mathcad 15

How does the symbolic calculator deal with it? Does it simplify first? e.g.
a ÷ b(b+b)
a ÷ b^2 + b^2
Solving for a = 8 and b = 2 could produce
8 ÷ 2^2 + 2^2 = 4
?

Re: Only in Mathcad 15

I meant to type =6 on the symbolic

Re: Only in Mathcad 15


@ptc-3007533 wrote:
I meant to type =6 on the symbolic

??? not sure what you are referring to.

 

The symbolics in Prime shows the same bug which is not much of a surprise as the problem is not the symbolic or numeric engine behind the scenes but the user interface and parser which had to be written from anew for Prime.

B1.png

In Mathcad the implicit multiplication (when you input 8 ÷ 2 (2+2)=) and the explicit one (typing 8 ÷ 2 *(2+2)=) give the same results as it should be. Defining the functions means that we first have to type the expression with a number in front of the opening parenthesis and then replace it by b. Otherwise we would create a function call if we just type b(b+b).

Of course Mathcad delivers the correct result also when using the symbolics.

BUT! While playing around in Mathcad I somehow (don't know exactly what I did) was able to create an expression which show the same error as the one in Prime.

B2.png

I could not spot any difference between the two (I attach the MC15 worksheet) and so I converted the sheet to Prime (Prime replaced every implicit multiplication by an explicit one) and so we see the structure Mathcad/Prime believes we had typed.

B3.png

Despite all of this - if we type "8 ÷ 2 (2+2)=" Prime must return 16 and not 1, so I still consider it a bug. Not that severe, as the character ÷  sure will be very seldom use for dividing, but a bug.

Or to show it with a simpler example:

B4.png

The implicit multiplication should make no difference.

But, alas, here i came across an inconsistent behavior in Mathcad, too, when evaluating symbolically:

B5.png

Putting parenthesis around a single variable should make no difference.