This profile is from a federated server and may be incomplete. Browse more on the original instance.

wischi,

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.

wischi,

What is the correct answer according to the convention you follow?

wischi,

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.

wischi, (edited )

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.

wischi, (edited )

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 ;-)

wischi,

Thank you for your kind words, really appreciate it.

wischi, (edited )

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.

wischi, (edited )

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 🤣

wischi,

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.

wischi,

You should read the part about WolframAlpha in the blog.

www.wolframalpha.com/input?i=6%2Fxy+where+x%3D2%2…

wischi,

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.

wischi,

🤣 I’m not sure if you read the post but I also wrote about that (the paragraph right before “What about the real world?”)

wischi,

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.

wischi,

❤️

wischi,

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.

wischi,

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.

wischi,

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.

wischi, (edited )

👍 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.

wischi,

Did you read the blog post?

wischi,

Sorry but I don’t follow. Did you read the blog post?

wischi,

Your example with the absolute values is actually linked in the “Even more ambiguous math notations” section.

Geogebra has indeed found a good solution but it only works if you input field supports fractions and a lot of calculators (even CAS like WolframAlpha) don’t support that.

wischi,

I tried to be careful to not suggest that scientist only use strong juxtaposition. They use both but are typically very careful to not write ambiguous stuff and practically never write implicit multiplications between numbers because they just simplify it.

At this point it’s probably to late to really fix it and the only viable option is to be aware why and how this ambiguous and not write it that way.

As stated in the “even more ambiguous math notations” it’s far from the only ambiguous situation and it’s practically impossible (and not really necessary) to fix.

Scientist and engineers also know the issue and navigate around it. It’s really a non-issue for experts and the problem is only how and what the general population is taught.

wischi, (edited )

Same priority operations are solved from left to right. There is not a single credible calculator that would evaluate “6 / 2 * 3” to anything else but 9.

But I challenge you to show me a calculator that says otherwise. In the blog are about 2 or 3 dozend calculators referenced by name all of them say the same thing. Instead of a calculator you can also name a single expert in the field who would say that 6 / 2 * 3 is anything but 9.

wischi, (edited )

The problem with BODMAS is that everybody is taught to remember “BODMAS” instead of “BO-DM-AS” or “BO(DM)(AS)”. If you can’t remember the order of operations by heart you won’t remember that “DM” and “AS” are the same priority, that’s why I suggested dropping “division” and “subtraction” entirely from the mnemonic.

It’s true that calculators also don’t dictate a standard but they implement what conventions are typically used in practice. If a convention would be so dominating (let’s say 95% vs 5%) all calculator manufacturers would just follow the 95% convention, except maybe for some very special-purpose calculators.

wischi,

❤️ True, but I think one of the biggest problems is that it’s pretty long and because you can’t really sense how good/bad/convining the text is it’s always a gamble for everybody if it’s worth reading something for 30min just to find out that the content is garbage.

I hope I did a decent job in explaining the issue(s) but I’m definitely not mad if someone decides that they are not going to read the post and still comment about it.

wischi, (edited )

“when in doubt” is a bit broad but left to right is a great default for operations with the same priority. There is actually a way to calculate in any order if divisions are converted to multiplications (by using the reciprocal value) and subtractions are converted to additions (by negating the value) that requires at least a little bit of math knowledge and experience so it’s typically not taught until later to prevent even more confusion.

For example this: 6 / 2 * 3 can also be rewritten as 6 * 2⁻¹ * 3 and because multiplication is commutative you can now do it in any order for example like 3 * 6 * 2⁻¹

You can also “rearrange” the order without changing the meaning if you move the correct operation (left to the number) with it (should only be done with explicit multiplication)

6 / 2 * 3 into 6 * 3 / 2 (note that I moved the division with the 2)

You can even bring the two to the front. Just remember that left to the six is an “imaginary” (don’t quote me ^^) multiplication. And because we can’t just move “/2” to the beginning we have to insert a one (empty product - check Wikipedia) like so:

1 / 2 * 6 * 3

This also works for addition and subtraction

7 + 8 - 5

You can move them around if you take the operation left to the number with it. With addition the “imaginary” operation at the beginning is a plus sign and the implicit number you use is zero (empty sum - check Wikipedia)

8 - 5 + 7

or like this

0 - 5 + 8 + 7

because with negative numbers you can use the minus sign to indicate negative numbers you can even drop the leading zero like this

-5 + 8 + 7

That’s not really possible with multiplication because “/2” is not a valid notation for “1/2”

wischi,

I still don’t see a number ;-) but you can take a look at the meme to see other people with math degrees shouting at each other.

wischi,

I’m not sure if you read the post yet but I also have a short section about alternative notations which are less ambiguous or never ambiguous. RPN has the same issue as most notations that are never ambiguous namely that it’s hard to read - especially for big expressions.

wischi,

The calculator section is actually pretty important, because it shows how there is no consensus. Sharp is especially interesting with respect to your comment because all scientific Sharp calculators say it’s 1. For all the other brands for hardware calculators there are roughly 50:50 with saying 1 and 9.

So I’m not sure if you are suggesting that thousands of experts and hundreds of engineers at Casio, Texas Instruments, HP and Sharp got it wrong and you got it right?

There really is no agreed upon standard even amongst experts.

wischi,

That’s actually a great way of putting it 🤣

wischi,

Thank you for taking the time to read it.

wischi,

Thank you so much for taking the time and reading the post. I just fixed the typos, many thanks for pointing them out.

There is nothing really to be embarrassed about and if you look at the comment sections of such viral math posts you can see that you are certainly not the only one. I think that mnemonics that use “MD” and “AS” without grouping like in “PE(MD)(AS)” are really to blame here.

An alternative would be to drop the inverse and only use say multiplication and addition as I suggested with “PEMA” but with “PEMDAS” one basically sets up students for the problem that they think that multiplication comes before division.

wischi,

@Prunebutt meant 4.5! and not 4.5. Because it’s not an integer we have to use the gamma function, the extension of the factorial function to get the actual mean between 1 and 9 => 4.5! = 52.3428 which looks about right 🤣

wischi,

Regarding your first part in general true, but in this case the sheer amount of calculators for both conventions show that this is indeed intended behavior.

Regarding your second point I tried to address that in the “distributive property” section, maybe I need to rewrite it a bit to be more clear.

wischi,

Did you read the blog post? I also quoted the exact same thing.

wischi,

In the blog post there are even more. Texas Instruments, HP and Canon also have calculators, and some of them show 9 and some 1.

wischi,

You are right the manual isn’t very clear here. My guess is that parentheses are also considered Type B functions. I actually chose those calculators because I have them here and can test things and because they split the implicit multiplication priority. Most other calculators just state “implicit multiplication” and that’s it.

My guess is that the list of Type B functions is not complete but implicit multiplication with parentheses should be considered important enough for it to be documented.

wischi,

All calculators that are listed in the article as following weak juxtaposition would interpreted it that way.

wischi,

It depends on what you mean by global agreement as there is no single source of truth but the left-to-right rule is pretty much default for multiplications/divisions and additions/subtractions. If you however have inline power notations with “^” symbol they are evaluated right-to-left. There are exceptions but those are typically well known in the industry. For example MathCad also evaluates powers from left to right, which is fairly untypical.

It’s not wrong if you make clear what you are doing. You can for example in a diagram call the axis a and b, not really wrong but pretty untypical if everybody else uses x and y, so you should have at least good reasons when doing it differently.

wischi,

?

wischi, (edited )

It’s practically impossible to do that because (applied) mathematics is such a diverse field and there is no global authority (and really can’t be).

Math notation is very similar to natural languages what you are proposing is a bit like saying we have an ambiguity in english with the word “bat”. It can mean the animal or the sport device. To prevent confusion the oxford dictionary editors just decide that from now on “bat” only refers to the animal and not the club. Problem solved globally? Probably not :-)

What you can do/try is to enforce some rules in smaller groups, like various style guides and standards are trying to do. For example it’s way simpler for a university to enforce certain conventions and styles for the work they and their students produce. But all engineers in Belgium couldn’t care less what a university in India is thinking about math notations.

For real projects that involve many people there are typically industry standards that are followed that work a bit like in the university example and is enforced by the participants of the project.

wischi,

Regarding the parenthesis the C# static code analyzer can be set to remove unnecessary parentheses.

learn.microsoft.com/en-us/…/ide0047-ide0048

IDE0047 is the static analyzer rule for “Remove unnecessary parentheses”

The default for those rules is to enforce parentheses on binary operations (because most people aren’t as familiar with the binary operator priorities as they are with regular math operator priorities) and remove unnecessary ones in other mathematical expressions.

Besides that I can’t remember that I saw a standard that states to only use parentheses if needed but I think it’s reasonable ro assume that most people would do that anyway. Writing ((((5+3)))*2) is obviously stupid even though I can’t think of any style guide that would explicitly state not doing that.

What many style guides actually state is to use proper fractions (horizontal bar) where ever possible.

Regarding the ambiguity with the implicit multiplication and division. The division is indeed required to make it ambiguous but actually only some kind of trigger

Let’s take 6(1+2)/2. Even though the priorities with weak and strong juxtaposition are not the same with respect to the implicit multiplication the answer would be the same but if you would think about the problem like a computer the way to get to the answer would be different (for example the calculators I mentioned in the article would do different things internally)

Strong juxtaposition: you solve the implicit multiplication first because it has higher priority than the division. After that you do the division. Answer is 9.

Weak juxtaposition: implicit multiplication has the same priority as division. You do them left to right and actually end up with the same result even when following different conventions.

So the implicit multiplication is the reason why there are two conflicting conventions (which are necessary for the ambiguity because if there would be only one widespread convention it wouldn’t be ambiguous) and the division is required to trigger the ambiguity (show where the two conventions differ).

The LTR thing is actually a very wide spread convention. I’m not familiar will all cultures on earth but my guess is of you use Arabic numerals and + and - you will work left to right for multiplication/division and addition/subtraction.

If one has a bit of math experience you can actually solve multiplication/division and subtraction/addition in any order (if you know what you are doing) like I described here: programming.dev/comment/5661037

wischi,

Exactly a/b*c equals (a/b)*c but I’d instantly reconsider my position if you can show me a single calculator that would handle that diffently (credible calculator, not the once that some students program for homework assignments).

Even though one shouldn’t treat calculators as some kind of authority but if all calculators handle it that way (all calculators of the five major manufacturers, Google, MathCad, Mathematics, various open source CAS) it’s probably a very good indictator that it’s not ambiguous.

What I also mentioned in the article is that standards and guidelines are typically stricter than most conventions in the name of clarity. So some of them even forbid things like “a / b * c” even if practically everybody agrees how this should be interpreted, just to be “extra-safe”

wischi, (edited )

Standards are as mentioned in the article often extra careful to prevent confusion and thus often stricter than widespread conventions with things they allow and don’t allow.

a/b*c is not ambiguous because no widespread convention would treat it any other way than (a/b)*c.

But you can certainly try to proof me wrong by showing me a calculator that would evaluate 6/2*3 to anything but 9.

So if there is not a single calculator out there that would come to a different result, how can it be ambiguous?

Update: Standards are rule-books for real projects to make it simpler to work together. It’s a bit like a Scrabble dictionary. If a word is missing in the official Scrabble dictionary, it doesn’t automatically mean that it’s not a real word, it just means that it wouldn’t be allowed to play that word in official Scrabble tournaments.

Same with (ISO) standards. Just because the standard forbids it doesn’t mean it’s not widespread or forbidden generally. It’s only forbidden in a context where all participants agreed to follow the standard.

wischi,

Thank you for taking the time reading it.

wischi,

Chat GPT’s answer for me:

Certainly! The expression 6/2(1+2) is ambiguous due to the implicit multiplication. Let’s solve it in both ways:

  1. Implicit multiplication with higher priority:

[ \frac{6}{2}(1+2) ]

First, solve the parentheses:

[ \frac{6}{2}(3) ]

Now, perform the division:

[ 3 \times 3 = 9 ]

  1. Implicit multiplication with the same priority as division:

[ \frac{6}{2(1+2)} ]

Again, solve the parentheses:

[ \frac{6}{2(3)} ]

Now, perform the multiplication first:

[ \frac{6}{6} = 1 ]

So, depending on the interpretation of implicit multiplication, you can get different results: 9 or 1.

I think it’s funny that ChatGPT figured out 1 and 9 but has the steps completely backwards. First it points out what has high priority and then does the exact opposite, both times 🤣

wischi, (edited )

Just saw the image you posted and it’s awesome :-) I’m part of the group that can’t solve it, because I don’t know the 🌭 function from the top of my head. I also found the choice of symbols interesting that 🌭 is analytical continuation of 🍔 and not the other way round 🤣

wischi,

“recently”, they are the standard for almost 25 years now.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines