Hello. This is my first post. I’m sorry if I’m either posting it incorrectly, or posting about something I
shouldn’t be.
If this is somewhere here already, then I don’t know enough to know what to search for to find my answer.
Ok… Please don’t sigh, and hear me out…
6÷2(1+2) I know, Eww. Right?
My question is why does Wolfram process the following differently than if it’s in numerical form?
a÷bc, a=6, b=2, c=(1+2) or transpose c=3 if that’s the correct format.
I don’t want to know if you think it’s 1 or 9. I don’t want to know if you think it’s ambiguous.
I’m asking why with numbers it gives me one answer, but with variables it gives a different answer.
Is there a Convention I’m not thinking of that explains it? Is it some Computer Programing thing?
What did I do wrong?
Thank you for your response.
I apologize, I thought I had attached a picture to my first post with the results.
You were correct in your assumption that no space was added between b and c. The only spaces I’ve used are after the commas between the variable definitions.
I did both of these in Natural Language mode.
To get the Obelus “÷” I used Alt+0247. I used an Obelus instead of the “/” as that’s what the
original numerical problem used. * I do understand that ÷ isn’t really used anymore, but I was attempting to stay as accurate to the original as possible *
Thank you for taking the time to help me understand what I hope is just an error in my Input that I’m not grasping.
Natural Language mode uses the Wolfram|Aplha interpreter. That in turn uses a different precedence convention for the ÷ (obelus) than is used by the Wolfram Language (maybe also for the slash division sign, I’m not sure). All part of the the perils of trying to second-guess what the user intended.
Thank you. I appreciate what you’re saying. Since my first post I’ve repeated the results by using “/” instead of “÷”. The results are the same. It is giving a different result (and a different formulation) when using variables in place of numerals. I’ll see what I can find on the Wolfram|Aplha interpreter, and read up on it to see if I can find my answer. Thank you for your time.
Sometimes, if you experiment a little bit with inputs to Wolfram Alpha, you can find a syntax that Wolfram Alpha will show you an “Input interpretation” below your input that matches what you want.
Example: I found
a/b c where a=6, b=2, c=(1+2)
seems to be understood and interpreted by Wolfram Alpha to be what you want.
So, I thank everyone who replied. I’ve read more on this subject than i’d care to admit. I came across a blog by a Physicist who had also noticed the same thing. He asked Chatgpt why, and this is what Chatgpt said…
" Why numeric and symbolic differ
Numeric input: WA uses a calculator-style left-to-right evaluation: 6 ÷ 2 × 3 = 9
Symbolic input: WA uses algebraic conventions: a ÷ bc = a ÷ (b*c) = 1
So the difference comes from “numeric calculator rules vs algebraic coefficient rules.”
This seems to be what i was wanting to know.
Thanks.