SmartmanApps,
@SmartmanApps@programming.dev avatar

Unfortunately some calculators, such as Google’s will ignore your brackets and put in their own anyway. You just gotta find a decent calculator in the first place.

EmrysOfTheValley,

https://beehaw.org/pictrs/image/48023ee9-d7b3-4853-b1b5-60c453c72d4f.webp

It is also frustrating when different calculators have different orders of operations and dont tell you.

SmartmanApps,
@SmartmanApps@programming.dev avatar

It is also frustrating when different calculators have different orders of operations and dont tell you.

Yeah, but to be fair most of them do tell you the order of operations they use, they just bury it in a million lines of text about it. If they could all just check with some Maths teachers/textbooks first then it wouldn’t be necessary. Instead we’re left trying to work out which ones are right and which ones aren’t. Any calculator that gives you an option to switch on/off “implicit multiplication”, then just run as fast as you can the other way! :-)

unlucky,

me using sbcl for everything

EunieIsTheBus, (edited )

I recall that there is a myriad of memes of the form ‘what is 4-2*3’ under which there is always a never ending discussion of confidently incorrect dumbasses denying the existence of the multiplication before addition rule.

So your suspicion is at least not unreasonable

SmartmanApps,
@SmartmanApps@programming.dev avatar
spongeborgcubepants,

Is the title a Requiem for a Dream reference?

7heo,
@7heo@lemmy.ml avatar

(> (explicit) (implicit))

FatTony, (edited )
@FatTony@lemmy.world avatar

My calculator says -2² = -4, so yeah…

ByGourou,

Isn’t the “-” order of operations the same as a multiply ? I think I learned powers take priority over the “-” so your calculator would be right.
But either way if it can cause confusion you should use parentheses.

TonyTonyChopper,
@TonyTonyChopper@mander.xyz avatar

Every calculator I’ve used has separate negative and subtraction keys for this purpose. There is no order of operations to follow, it’s just a squaring a number

SmartmanApps,
@SmartmanApps@programming.dev avatar

it’s just a squaring a number

The number being squared is 4, unless you put (-4)², otherwise it’s 4² with a minus sign.

ByGourou, (edited )

I learned negative as being a separate operation where we need to apply the order of operations. I think it was something like : -2 is a diminutive for -1x2 so it uses the order of operations of a multiplication.
My calculator is the official one used in schools in France (ti-83 premium ce) and it says -2^2 = -4 with the negative key. I don’t think it would make a mistake in such a simple concept.

But whatever these concepts can change depending on the field, country, level of education. What I mean is : it’s unclear, so use parentheses. So (-2)^2 or -(2^2) are the correct ways to write it.

SmartmanApps,
@SmartmanApps@programming.dev avatar

I think it was something like : -2 is a diminutive for -1x2

Correct. Things that are usually left out of Maths expressions are plus signs, ones as multipliers/indices, and un-needed brackets. e.g. I could more fully write this as -1(4)², but that just simplifies to -4²

SmartmanApps,
@SmartmanApps@programming.dev avatar

I think I learned powers take priority over the “-”

Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.

Ultraviolet,

I would never write -n². Either ‐(n²) or (-n)². Order of operations shouldn’t be some sort of gotcha to trick people into misinterpreting you, it’s the intuitive reading of a well constructed mathematical expression.

SmartmanApps,
@SmartmanApps@programming.dev avatar

Either ‐(n²) or (-n)². Order of operations shouldn’t be some sort of gotcha to trick people into misinterpreting you

It isn’t. With ‐(n²), n² is already a single term, so the brackets aren’t needed.

SmartmanApps,
@SmartmanApps@programming.dev avatar

My calculator says -2² = -4

That’s correct

lolcatnip, (edited )

I’ve never seen a calculator that had bracket keys but didn’t implement the conventional order of operations.

But anyway, I’m on Team RPN.

masterspace, (edited )
lolcatnip,

Ah, I wasn’t thinking of calculators that let you type in a full expression. When I was in school, only fancy graphing calculators had that feature. A typical scientific calculator didn’t have juxtaposition, so you’d have to enter 6÷2(1+2) as 6÷2×(1+2), and you’d get 9 as the answer because ÷ and × have equal precedence and just go left to right.

SmartmanApps,
@SmartmanApps@programming.dev avatar

A typical scientific calculator didn’t have juxtaposition, so you’d have to enter 6÷2(1+2) as 6÷2×(1+2)

That’s not true

you’d get 9 as the answer because ÷ and × have equal precedence and just go left to right

Well, more precisely you broke up the single term 2(1+2) into 2 terms - 2 and (1+2) - when you inserted the multiplication symbol, which sends the (1+2) from being in the denominator to being in the numerator. Terms are separated by operators and joined by grouping symbols.

lolcatnip,

I’m not sure what you’re getting at with your source. I’m taking about physical, non-graphic scientific calculators from the 1990s.

SmartmanApps, (edited )
@SmartmanApps@programming.dev avatar

I’m taking about physical, non-graphic scientific calculators from the 1990s.

Yep, exact same as the calculator in the linked thread. The expression entered was 6÷2(1+2).

SmartmanApps,
@SmartmanApps@programming.dev avatar

plus.maths.org/content/pemdas-paradox

There’s no pemdas paradox, just people who have forgotten the order of operations rules

Even two casios won’t give you the same answer:

The one on the right is an old model. As far as I’m aware Casio no longer make any models that still give the wrong answer.

https://programming.dev/pictrs/image/92eab14c-a98b-4aab-82ec-f1e1611d70da.png

isolatedscotch,

my dumb ass reading this: “Team rock paper nscissors”

lolcatnip,

RTS = rock taper scissors FPS = frock paper scissors

SmartmanApps,
@SmartmanApps@programming.dev avatar

I’ve never seen a calculator that had bracket keys but didn’t implement the conventional order of operations.

I’ve seen plenty

ArcticAmphibian,

$((A+B))

Jakylla,
@Jakylla@sh.itjust.works avatar

Gotta use Lisp notation to be sure

MeDuViNoX,

(‿!‿) (‿O‿)

The_Cunt_of_Monte_Cristo,
@The_Cunt_of_Monte_Cristo@lemmy.world avatar

( . ) ( . ) ( . Y . )

ASeriesOfPoorChoices,

back and forth, forever.

RinseDrizzle,

Suuuuuch a weird movie lol

Kowowow,

Ooh I love brackets

Lemmy_Cook,

I feel this in my bones

mathic,

I, my head, shake.

  • RPN user
rockerface,

Also known as: Japanese speaker

SmoothLiquidation,

This is why every calculator should be a RPN calculator.

lemmyng,
@lemmyng@lemmy.ca avatar

I still have my HP 48 series calculator. It’s a sturdy beast.

SmartmanApps,
@SmartmanApps@programming.dev avatar

This is why every calculator should be a RPN calculator

No, this is why programmers should (re)learn the order of operations rules before writing a calculator.

ooli,

I just used the calc on window… it cannot respect order of operation. Any simple calculator from 1980 was better than that

SmartmanApps,
@SmartmanApps@programming.dev avatar

I just used the calc on window… it cannot respect order of operation

Yeah, I’ve tried several times to get Microsoft to fix their calculators. I’ve given up trying now - eventually you have to stop banging your head against the wall.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • science_memes@mander.xyz
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • Durango
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • ethstaker
  • kavyap
  • thenastyranch
  • osvaldo12
  • provamag3
  • cisconetworking
  • modclub
  • GTA5RPClips
  • khanakhh
  • tacticalgear
  • cubers
  • tester
  • Leos
  • megavids
  • normalnudes
  • anitta
  • JUstTest
  • lostlight
  • All magazines