SmartmanApps
@SmartmanApps@programming.dev
- Comment on ))<>(( 7 months ago:
The syntax is arbitrary in some edge cases
Such as?
- Comment on ))<>(( 7 months ago:
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).
- Comment on ))<>(( 7 months ago:
- Comment on ))<>(( 7 months ago:
Order of magnitude?
It’s actually short for “to the order of”, as in 2 squared is 2 to the order of 2. i.e. same thing as Exponent or Index.
- Comment on ))<>(( 7 months ago:
order?
It’s actually short for “to the order of”, as in 2 squared is 2 to the order of 2. i.e. same thing as Exponent or Index.
- Comment on ))<>(( 7 months ago:
AFAIK, this is correct to the point that I have understanding of. I’m not a mathematician
I’m a Maths teacher/tutor. The actual rules are Terms and The Distributive Law. There is no such thing as “implicit multiplication” (which is usually people lumping the 2 separate rules together as one and ending up with wrong answers).
- Comment on ))<>(( 7 months ago:
My calculator says -2² = -4
That’s correct
- Comment on ))<>(( 7 months ago:
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! :-)
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
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²
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
I think I learned powers take priority over the “-”
Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
I’ve never seen a calculator that had bracket keys but didn’t implement the conventional order of operations.
I’ve seen plenty
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
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.
- Comment on ))<>(( 7 months ago:
Math should be just as deterministic as programming, but it’s not in some situations
Maths is 100% deterministic for order of operations. The issue is people not following all of the rules. Order of operations thread index
- Comment on ))<>(( 7 months ago:
The exact problem is math is not taught correctly
Every single Maths textbook I’ve seen teaches it correctly. The issue is people not remembering what they were taught (and then programming a calculator without checking it first). Calculators
- Comment on PEMDAS is technically correct, but morally wrong 7 months ago:
You can if you wrote everything as just addition and subtraction, but then we made some shorthand notations for that, such as 2x3=2+2+2, and so now you have to do multiplication before addition otherwise you get a wrong answer, and if you wrote all multiplications before all additions there’d still be no problem, but as someone else pointed are, there are cases where it’s easier to have a different order, and so voila! Order of operations rules.
- Comment on PEMDAS is technically correct, but morally wrong 7 months ago:
Actually multiplication and division are shorthand notations for addition and subtraction - e.g. 2x3=2+2+2 - so everything boils down to addition and subtraction.
- Comment on Apple Wants To Kill PWAs 8 months ago:
why do you think most business are already writing a separate Android app
I don’t think that. I know some businesses who are still writing separate apps, instead of switching to cross-platform. You’ll have to ask them why they’re doing that. It frustrates me no end when platform-specific bugs come up because they’re running different code on each platform, each written by different people.
the fact that people interact by touch rather than with a mouse and keyboard
…makes no difference at all. Whether a user has touched a button, clicked on it, or tabbed to it and pressed enter, the same Button.Clicked event gets triggered.
- Comment on Apple Wants To Kill PWAs 8 months ago:
The original comment was
it will kill PWAs
like if Apple STOPS doing it then everyone else will stop doing it. Like when Apple stopped having 3.5mm jacks everyone else stopped having 3.5mm jacks. Oh wait…
As I said, they’re big spenders, not trend-setters.
- Comment on Apple Wants To Kill PWAs 8 months ago:
It’s not at all like building a separate app. All the back-end code is identical - all you have to do is make the mobile version not take up as much screen-space, and that’s not much work. e.g. on desktop I use icon and text, but on mobile icon only.
- Comment on Apple Wants To Kill PWAs 8 months ago:
No, what’s silly is to not follow the correct grammar of spelling out an acronym in full the first time. Microsoft does this all the time and you’re left not being able to use the document because you have no idea what they’re talking about, and they haven’t linked to anything about it either. e.g. try Googling COM and let me know how you go with finding out what it means. You should never assume the reader knows what it is. It’s gate-keeping.
- Comment on Apple Wants To Kill PWAs 8 months ago:
That doesn’t make them trend-setters though - that just makes them big spenders on marketing. i.e. Android wasn’t following what Apple did - they’d already been doing it first!
- Comment on Apple Wants To Kill PWAs 8 months ago:
But it wouldn’t only work on Android. It would also work on Windows and Unix and any other niche operating system that can run a browser (my Blu-ray recorder has a browser in it). There’s a whole world outside Apple/Android. This message brought to you by a browser running on Windows…
- Comment on Apple Wants To Kill PWAs 8 months ago:
People also forget that smartphones existed before iPhones and MP3 players existed before iPods.
- Comment on Apple Wants To Kill PWAs 8 months ago:
Look for every time Apple has said “reimagined” and you’ll find a feature that Android had 5 years earlier.