6÷2(1+2)
wischi @ wischi @programming.dev Posts 3Comments 304Joined 2 yr. ago
👍 That was actually one of the reasons why I wrote this blog post. I wanted to compile a list of points that show as clear as humanity possible that there is no consensus here, even amongst experts.
That probably won't convince everybody but if that won't probably nothing will.
In a scientific context it's actually very rare to run into that issue because divisions are mostly written as fractions which will completely mitigate the issue.
The strong implicit multiplication will only cause ambiguity after a division with inline notation. Once you use fractions the ambiguity vanishes.
In practice you also rarely see implicit multiplications between numbers but mostly between variables or variables and their coefficients.
Now you changed it to an explicit multiplication. The ambiguity only comes from the implicit multiplication after a division, that's when the interpretation can be ambiguous. That's what the blog post really is about.
If you are not kidding, can you show your steps I can try to help you, but I can't currently think of a way how you'd end up with 15.
Thank you very much 🫶. No it's not annoying at all. I'm very grateful not only for the fact that you read the post but also that you took the time to point out issues.
I just fixed it, should be live in a few minutes.
🤣 I'm not sure if you read the post but I also wrote about that (the paragraph right before "What about the real world?")
I'm not sure if I'd call it the "scientific" one. I'd actually say that the weak juxtaposition is just the simple one schools use because they don't want to confuse everyone. Scientist actually use both and make sure to prevent ambiguity. IMHO the main takeaway is that there is no consensus and one has to be careful to not write ambiguous expressions.
You should read the part about WolframAlpha in the blog.
https://www.wolframalpha.com/input?i=6%2Fxy+where+x%3D2%2C+y%3D3
In this case it's actually the absence of sources. I couldn't find a single credible source that states that ÷ has somehow a different operator priority than / or that :
The only things there are a lot of are social media comments claiming that without any source.
My guess is that this comes from a misunderstanding that the obelus sign is forbidden in a lot of standards. But that's because it can be confused with other symbols and operations and not because the order of operations is somehow unclear.
This meme is specifically about the implicit multiplication because the article it links to is about that too.
But you are right there are a lot more "viral math" things than just the implicit multiplication problems 🤣
It's not really a calculator engineering problem. If you don't have time to read the entire blog you should definitely check out the section "But my calculator says...". It's actually about order of operations regarding implicit multiplication.
Ooh now I get you, sry. True. But sadly you now know the truth and you have to be careful with the implicit multiplications on your tax forms from now on ;-)
Thank you for reading the post, and thanks for pointing that out. Should be fixed and live in the next few minutes.
Update: Also fixed that sentence. Thank you so much.
That's the correct answer if you follow one of the conventions. There are actually two conflicting but equally valid conventions. The blog explains the full story but this math problem is really ambiguous.
Thank you so much for taking the time. I'm also not convinced that APS's notation is a very good choice but I'm neither american nor a physisist 🤣
I'd love to see how the exceptions work that the APS added, like allowing explicit multiplications on line-breaks, if they still would do the multiplication first, but I couldn't find a single instance where somebody following the APS notation had line-break inside an expression.
Did you read the blog post?