Re:Google confirms 'high-friction' sideloading flow is comin...
by toxik on Sunday January 25, 2026 @09:02AM
(#46754151)
-4 makes sense if you understand that the input -2 is a unary minus operation. So typing -2 then hitting square only squares 2, not (-2). This is the same in eg Python so I'm not sure it's very controversial. I agree it's unexpected, though.
[ Parent
| on HN ]
Re:Google confirms 'high-friction' sideloading flow is comin...
by AshamedCaptain on Sunday January 25, 2026 @10:21AM
(#46754808)
At no point in the current expression you wrote "-", though. It may make sense that if you type [-] [2] [x^2] [=] then you get -(2²) = -4, but if your current answer is already -2, then tapping x² should result in (ans)^2 = (-2)^2 = 4. Splitting your current answer into a separate unary [-] as in - (2²) makes absolutely no sense.
Most calculators, even CAS ones, simply get this always right. But sadly this is not the first "desktop" calculator that I see getting this completely wrong. And it makes some results outright wrong!
Re:Google confirms 'high-friction' sideloading flow is comin...
by well_ackshually on Sunday January 25, 2026 @09:30AM
(#46754333)
"-4 makes sense if you consider that the calculator is so damn stupid it ignores every convention every single calculator has made in the past hundred years and instead copies behavior of a dumbass language" isn't exactly the praise you think it is.
Re:Google confirms 'high-friction' sideloading flow is comin...
by ben_w on Sunday January 25, 2026 @10:34AM
(#46754940)
I didn't enter -2, I calculated -2. The x² should have been taking x = (-2).
Re:Google confirms 'high-friction' sideloading flow is comin...
by ndriscoll on Sunday January 25, 2026 @02:28PM
(#46757321)
Python gets it right:
>>> 2-4
-2
>>> _**2
4
Re:Google confirms 'high-friction' sideloading flow is comin...
by bigstrat2003 on Sunday January 25, 2026 @02:59PM
(#46757590)
What? The person you're replying to isn't typing -2. He said explicitly what he is typing, and the result is unambiguously incorrect.