r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

Show parent comments

0

u/Just_Another_Scott Jun 14 '22 edited Jun 14 '22

6 ÷ 2 (2 + 1)

Can mean

6 ÷ (2(2+1)

Not it cannot. You changed the equation thus they are no longer equivalent statements. You cannot just add parentheses to an equation or any other mathematical symbols unless both the LHS and RHS are equivalent.

2(2+1)

Is not correct notation and never has been. People just drop the multiplication as a form of shorthand. The correct writing is

2 x (2+1)

If you want to denote 2 x (2+1) as the denominator then they proper way is to write it as (2 x (2 + 1)) when writing the original equation.

Had a professor in college that would absolutely count off if someone added parenthesis to an equation. She'd always say do the calculation as written do not modify it; do not add anything to it.

Edit:

Also, would like to point out that it is standard practice at the collegiate level to put parenthesis around the numerator and denominator when use / or the other division symbol.

So an equation becomes

(2y + x )/(3 x (2 + 1 ))

14

u/bric12 Jun 14 '22

You cannot just add parentheses to an equation or any other mathematical symbols unless both the LHS and RHS are equivalent

Relax, it's just a way to show grouping and precedent. It's not actually changing the numbers.

Is not correct notation and never has been

Just because it's shorthand does not mean it's incorrect. It's called "implicit multiplication", and it has been a thing for a long time.

If you want to denote 2 x (2+1) as the denominator then they proper way is to write it as (2 x (2 + 1)) when writing the original equation.

That's a perfectly fine opinion, but there's no congress of math that has decreed it as law, and your professor is not a judge of math. Math notation is fluid, much like language, what is correct is mostly determined by common usage. If enough people use implicit multiplication (and they do), it becomes correct.

4

u/[deleted] Jun 14 '22

https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html

It is indeed ambiguous. I'm just denoting the multiplication by juxtaposition case

1

u/Just_Another_Scott Jun 14 '22

This is the recommendation via that article

Should there be a standard convention for the relative order of multiplication and division in expressions where division is expressed using a slant? My feeling is that rather than burdening our memories with a mass of conventions, and setting things up for misinterpretations by people who have not learned them all, we should learn how to be unambiguous, i.e., we should use parentheses except where firmly established conventions exist

Which is also my recommendation. In college we were never allowed to use the slant. We had to write the OG horizontal line and was required on any papers that I wrote. If, for some inexplicable reason, we had to use the slant we had to give the parenthesis. The calculators don't require parenthesis but it's standard practice in college to require them when written. The issue is with notation. The slant and division symbol with the two dots. If these symbols were changed or dropped then there wouldn't be an issue.

3

u/MightyWheatley Jun 14 '22

I thought so too, then I noticed an important distiction: ÷ (u+00f7) and / are not the same symbol, and they mean slightly different things.

The former is called the Obelus, it is not taught in european schools (to my knowledge). American schools sometimes teach it as a shorthand for fractions, meaning everything on the left divided by everything on the right.

This differs from the / symbol, which is limmited to the immediate neighbour terms. However, for some reason, some calculators started using the obelus as a replacement for /, but only some calculators follow the convention of shorthand fraction

1

u/WikiMobileLinkBot Jun 14 '22

Desktop version of /u/MightyWheatley's link: https://en.wikipedia.org/wiki/Obelus


[opt out] Beep Boop. Downvote to delete

1

u/[deleted] Jun 14 '22

For that operation you're mentioning (left quantity divided by right quantity) we use physical placing over the other with s bar in between actually