Maths Test! 2(1+2)2/(1+2)

WolframAlpha is incapable of evaluating "6/2(1+2)". It is not telling you the answer to 6/2(1+2), because there is no operation listed between 2 and (1+2). WolframAlpha then inserts a multiplication sign, since putting two terms besides each other means multiplication. Computer programs are usually unable to resolve matters of implicit multiplication, and simply don't - they leave it up to the user to properly state the problem. I hope you don't expect programs to always interpret user inputs perfectly all the time.

So WolframAlpha is correct, in a way.

6/2*(1+2) = 9
but
6/2(1+2) = 1
WolframAlpha is correct, entirely. When there is no sign between a number and a parenthesis, that means you multiply, which is exactly what WolframAlpha did:
scaled.php
 
No it didn't, it gave 2 different answers... clearly 1/2pi and 1/pi2 should give the same answer, by your argument.

Exactly, and it didn't, because WolframAlpha isn't designed for assessing implicit multiplication. You may need to look back over my posts.
 
One thing computer programs are, when dealing with maths... is reliable.
 
WolframAlpha is correct, entirely. When there is no sign between a number and a parenthesis, that means you multiply, which is exactly what WolframAlpha did:
scaled.php

Thanks for changing the input once again. You continue missing the point.
 
Exactly, and it didn't, because WolframAlpha isn't designed for assessing implicit multiplication. You may need to look back over my posts.

But it decided 2pi was an implicit multiplication... using your terminology.

Anyway, CBA arguing, put brackets in, otherwise you get moaned at if I see it in your code, where I work.
 
This reveals the problem of implicit multiplication taking priority.
It is not an actual rule (as Defiant47 admits) but just something people inconsistently assume. And because of this it should not be accepted as the objective criteria determining how to operate an equation. Rather, it is merely a mutual understanding of convenience, so is objectively false, but subjectively true because the subjective frame of reference differs from the objective one.
 
But it decided 2pi was an implicit multiplication... using your terminology.

Anyway, CBA arguing, put brackets in, otherwise you get moaned at if I see it in your code, where I work.

No, it didn't decide 2pi was implicit multiplication.

Again, reread my posts. There is no actual "implicit multiplication", it's just a term I use to help people understand and conceptualize it into an order of operations. Under normal notational procedures, 2pi is one term. There isn't 2 and pi. It's just 2pi.

Implicit multiplication means that you do this multiplication first (before all other multiplications/divisions) or last (but reading it as "last" may confuse you more, so let's just stick with "first"). Mainly because it's understood as one term.

1/2pi = 1/y where y = 2pi
1/pi2 = 1/y where y = pi2

WolframAlpha
Input: 1/2pi
Interpretation of input: 1/2*pi
Input: 1/pi2
Interpretation of input: 1/pi*2


PS: Because this is such a notational issue, you should never encounter "1/pi2". Under strict assessment of the notation, it does mean "1/(pi2)", but nobody will write it like that. Just like nobody will write 1/(2pi) instead of simply writing 1/2pi.
 
On a related note, MATLAB refuses to even answer the question unless you put in the explicit *

This should be the correct response for a computer program.
 
This should be the correct response for a computer program.

The thing is, putting two things beside each other always implies multiplication. And people get so accustomed to implicit multiplication, that they'll put it into a math program without even thinking (it's happened to me too many times). Especially when you're writing a long equation, getting an error might be very problematic, whereas bypassing notational requirements and simply inserting the multiplication signs will usually give the same answer.

It depends on how user-oriented or math-oriented the program is. Something like MATLAB is designed for complex mathematical calculations, so adheres to a strict guideline, such as requiring explicit operations. WolframAlpha, which is designed to be more user friendly and commercial, opts to directly give an answer and go with the easy almost-always-correct route, rather than the always-correct route.
 
WolframAlpha uses Mathematica underneath, which is a very very serious mathematical program.
 
WolframAlpha uses Mathematica underneath, which is a very very serious mathematical program.

But I bet the user input section is designed to be user friendly, rather than hardcore math oriented. It does make up for it by restate the interpreted input back to the user, though.

There are two issues here. There's the mathematical evaluation issue, and interpretation of input issue. "Mathematica" is likely "very serious" and can PWN any mathematical evaluation, always giving the right answer. But the issue here is of the input.

We write 1/2pi, but Wolfram is not equipped with the right tools to evaluate that properly and give it to Mathematica to solve (nor is any program - they usually simply reject the input like MATLAB). But since it's a more commercial product, it adjusts the input according to what is likely the user's desired equation. Only in rare cases will it get it wrong using this method, but it's worth the user-friendliness that it brings about.
 
Yeah, I agree. It's following the principle of least surprise, as I mentioned earlier.

1/pi2, I'm surprised it accepted that though ;) I was kind of hoping it would evaluate it as 1/(pi2), myself.
 
I would expect 1/2pi to mean 1 / (2*pi). Mostly because "2pi" crops up soooo often that "2pi" is, essentially, a symbol in its own right. Similarly, I would expect "h/2pi" to resolve to h-bar. Wolfram alpha doesn't do this, however, which is kind of disappointing.
 
So what about 1/a.b? To me, that means 1/(a*b). But 1/a*b still means b/a. To dot just makes it clear that they are two different symbols, just in case there is also a symbol, function or constant called "ab".

EDIT: e.g. 1/n.pi would mean 1/(n*pi). In this case, the . distinguishes this from 1/(n*p*i), where n,p,i are all separate symbols.
 
So what about 1/a.b? To me, that means 1/(a*b). But 1/a*b still means b/a. To dot just makes it clear that they are two different symbols, just in case there is also a symbol, function or constant called "ab".

EDIT: e.g. 1/n.pi would mean 1/(n*pi). In this case, the . distinguishes this from 1/(n*p*i), where n,p,i are all separate symbols.
And if you write 1/a×b?

What if you use 1÷a×b?
 
That's surprising ;)

It's all very arbitrary, it seems. That's not good for parsing.

Are we kidding ourselves this is an interesting debate? Boundless (OP) is probably laughing her socks off at us maths nerds (probs while reading a book about the French Revolution or something - which doesn't mention Galois).
 
Haha, 1/npi = 1/(n*pi), not pi/n.
But 1/2pi = pi/2, not 1/(2*pi).

So I guess you were right earlier, Wolfram does interchange the rules.

No, it interprets 1/2pi as 1/(2*pi). It interprets 1/pi2 as 2/pi though...

DRUNK AGAIN!

EDIT: Maybe it doesn't... I've been drinking ;) 1/2pi, 1/pi2 and 1/(2*pi) give 3 different answers.
 
Back
Top Bottom