Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Wolfram alpha is giving inconsistent results to this problem:

When I enter:

16÷2( 8-3(4-2) )+1 the result is 17.

When I enter:

16÷2[ 8-3(4-2) ]+1 the result is 5.

and

16÷2*[ 8-3(4-2) ]+1 brings us back to 17.

I attribute the third case to the explicit multiplication, meaning the division occurs before the 2 is distributed over the bracket. But should the first two not yield the same result?

NOTE: The original problem was intentionally ambiguous, with the purpose of showing the dangers of the ÷ operator, so lets not talk about that.

share|improve this question
1  
If your question is just about the mathematics, then it is a duplicate of this question. If it is about how Wolfram Alpha decides to evaluate expressions, it is probably better for mathematica.SE (though I think they prefer questions about Mathematica proper, not Wolfram Alpha). –  Zev Chonoles Feb 25 '12 at 16:57
2  
@Chris Are you actually asking a question, or just making an observation about Wolfie's behavior? –  Tanner Swett Feb 25 '12 at 17:47

1 Answer 1

up vote 1 down vote accepted

It has nothing to do with $÷ $ at all. It is all about how Alpha interprets "$2*[..]$" vs "$2[..]$".

The square bracket means a function application. Alpha gives precedence to $f[x]$ (expression $f$ applied to expression $x$, or $f(x)$) over other arithmetic operators. But since $2$ is not a function, $2[\cdots]$ is interpreted as $(2\times \cdots)$ before the rest of the expression.

You can easily see the difference is a simpler example: $16 ÷ 2[3]$ is $$\frac{16}{2 \times 3}$$ but $16 ÷ 2*[3]$ is $$\frac{16}{2}\times 3.$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.