If You Type 1+2+3 Into Your iPhone's Calculator on iOS 11, You Probably Won't Get 6 (qz.com)
A reader shares a report: If you've upgraded your iPhone's operating system to iOS 11, try this: Go to the calculator app and quickly type 1+2+3. You likely won't get 6. You might get 23, or 24, or 16, or 32, or something else, depending on what buttons you tap and in what order, and, obviously, none of which is the right answer. It seems to be because of a new animation in the calculator app, where a button briefly fades to white when you press it. The result is that if you press an operator button (i.e., the plus sign) before the short animation finishes, the app ignores it. So, 1 + 2 + 3 accidentally gets read as 1 + 23.
After a basic hello world intro, I had to write a calculator to add subtract multiply and divide in the first week of college. Had mine worked like apples Iâ(TM)d have likely failed. How does this happen?
Although I wonder if the fix would be just to be brave enough to just remove the calculator. Maths is an outdated technology anyway...
UI and software quality is falling because of the emphasis on appearance rather than function, hence Unity and GNOME 3 and this article's stupidity.
GUI animation is the absolute cancer. It's everywhere, on desktop, in applications, on websites.
Really feels like everything returned to the 90's web state full of animated GIFs, blinking text and endless pop-ups.
If you're a developer, please don't be a jerk and get rid of all the animated crap, please.
Only LUDDITES want LUDDITE accurate numbers! Modern app appers want appy numbers that let them app apps while apping other apps!
Apps!
... produce things like this. They should be sacked for gross incompetence.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
It's pretty funny really, because Apple makes a big deal about how app developers are not supposed to block UI, and about how to make animations interruptible. The fix will probably be pretty simple...
The calculator issue is really bad though. Even just moderately fast pressing of buttons yields input blocking depending on what you are doing.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I and LIKE retro! Besides, I got money to burn, and if I look good - retro - doing it, ALL THE BETTER!
I think the subject line pretty much covers it.
CPU time and network time should be better spent on the really important stuff that computers are supposed to do: check for app and o/s updates.
"But remember, most lynch mobs aren't this nice." (H.Simpson)
-- Joe
Bug status : rejected.
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
that animation is sexy as hell!!
worth it
Here is a 1200$ super computer that fits into your pocket! Unfortunately it can't do math.
... if apple had stuck to it's skeuomorphic design principles.
Which has more power: the hammer, or the anvil?
Isn't this a normal thing on Apple products? Make it look good, and don't worry if it actually works?
Seriously though, this is what is wrong with the world today. Everyone is so concerned with the looks and functionality is an afterthought.
You're holding it wrong.
http://thomasokken.com/free42/
with the skin of your choice: http://thomasokken.com/free42/skins/
And for details, http://www.hpmuseum.org/hp42s.htm
Apple epitomizes innovation. Here they demonstrate the true value of out-of-the-box-thinking ... and it's not the value you'd expect!
It seems like the reader who submitted this has similar trouble with math as the calculator application.
I get how 24 is produced as it was the example given in the post however I can't figure out how you're supposed to get 23, 16, or 32.
I'm also somewhat confused about why someone, then asked to enter 1+2+3, would be pressing buttons in any order other than the order they were asked to or why they would be pressing other buttons.
Maybe I'm just getting too old for the new-fangled math kids these days learn in school.
Itâ(TM)s obvious when it does this, the display will show 23 rather than the result of the first operation..... I think most normal people would notice that when they pushed plus and it didnâ(TM)t do anything, they would assume they have to push it again... ?
Does that mean my iphone is working correctly or incorrectly by Apple standards.
If I try this with the calculator on my Android phone, I get “+ Error: Too Few Arguments" as soon as I hit the first +. Guess what is my favourite calculator app.
You type it wrong.
I'm happy Apple is taking so many innovative, brave, bold moves. Their emphasis on UI, and animation, is transforming the calculator industry.
I just tried this now in the calculator that comes with windows 10. (im on build 1707 "creators update" not the fall one.) I pressed the following keys:
3 + 3 * 3 =
It displayed 12.
As for the old calc.exe app, it behaved the same as the old physical ones that didn't queue up operations, and executed each operation immediately. So it pretty much did what i expected it to do too.
I mean, honestly, I don't use windows built in calculators much myself; i don't need the big friendly touch buttons on my desktop; that's not a UI i need or want, and its waste of space; and they're functionality relatively weak.
I use SpeQ as my quick desktop calculator these days. I'm curious what other people are using.
No, if you type 3+3 and then hit x you get the answer of 3+3 = 6, then you "x" and "3" you get 18. You are asking the calculator what is 3+3 and then asking it to multiply that answer by 3. This is working as designed because it's not a scientific calculator. If you simply switch to Scientific in the options, you can use "( )" and/or other functions to put in a formula. As far as I know the standard Apple calculator does not a scientific option. The user is in error if they want 3+3 * 3 in a non scientific calculator and start hitting buttons.
Sent from my TARDIS
Reminds me of gmail.com's login form which has a similar bug.
If you type username and then Return, the Return does not immediately switch focus to the password field - it only starts an animation and passes focus to the password field when the animation is done.
So, if you type your password too fast, the first few characters will not end up in the password field (or not at all, if your password is short).
Bugs the hell out of me. The older login form did not have this bug.
"We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
I just confirmed on my iPhone. Although, to be fair, if you have sounds enabled you can easily hear (or rather not-hear) the "tick" sound when the operator button fails to notice that its been touched.
The real fail is the existence of animations in general. Why do they make you wait 1-2 seconds to watch a "fly in" animation when you unlock the screen? Or any number of other equally time consuming transition animations. The phone would feel so much faster if you could disable all* of these silly animations.
* Some reduced motion toggles are still available in the "Accessibility" settings
Kids today don't know what a calculator is unless someone wears it on a shirt.
You are using it wrong there's no bug !
I had long missed PowerCalc, and SpeQ seems very similar. I had it working in Win10 for a while, but it was a hassle.
-]Phreak Out[-
Why did Apple think this was necessary? It's awful design.
Enter "3 + 3 * 3" in any Windows Calculator app, and see what you get! 18! (Multiplication has higher precedence than addition! Answer should be 12!)
And would you trust Excel? I wouldn't!
I'll stick to Linux and Android, thank you!
Switch your windows calculator to scientific, it will then respect order of operations. Apparently you became a scientist when you learned these things in 3rd grade, you just didn't know it!
On Win 10 standard calculator ==> 18 Scientific calculator ==> 12
On an iPhone, holding the phone sideways (landscape orientation) changes the calculator app to a scientific calculator. Parens and trig functions are available.
Possibly on your O/S version, not any I have available:
Windows 7 in Basic, Non-Scientific mode - 18
Android, Non-Scientific calculator - 12
Debian Linux KCalc in Simple (Non Science mode) - 12
C Programming language Table of operator precedence - 12
Any bets?
As far as I know the standard Apple calculator does not a scientific option.
Sure it does. Just put your phone into landscape mode.
It takes real courage to be the pioneering company in the introduction of bugs into extremely basic apps. Most companies would stick with the safe and boring route of having your calculator always give correct results, but not here at Apple! We challenged our iOS developers to really push the envelope and think outside the box to find ways we can keep the iOS experience fresh for our users. That is why we are proud to announce that we have introduced a bug into the Calculator app that gives you unpredictable results even for basic operations! You never know what answer you might get! Our critics might say that this is the sort of mistake that even a first year Computer Science student wouldn't make, but that is what makes Apple so courageous for implementing it! Download iOS 11 today and experience this, and other, courageous bugs!
Simple solution. Don't use the Iphone.
This is just bad QA. If the QA team had done their job better, they would have caught it and the bug would have been fixed.
I pretty much never use the stock calculator app on my phones since they don't do RPN. A good HP 48G emulator is usually one of my first downloads after getting a new device.
I browse on +1 so AC's need not respond, I won't see it.
Alternate facts...
This is an accurate and correct description of the behavior of calc.exe .
For my purposes, I'm almost always in scientific mode (occasionally in programmer mode, but only if I don't want to open up a better tool).
Can I sue Apple for me getting F in school HW?
Did they bury the QA team with Jobs?
Texas Instruments had a similar screwup in the early 80's. After capturing a huge chunk of the U.S. calculator market (TI and HP were the brands to buy), Texas Instruments released a series of lower-cost scientific calculators where the keys were not properly debounced . It was practically impossible to type in a long equation without having multiple double or triple press errors.
I tossed mine in disgust, tried out one of the new Sharp scientific calculators just hitting the market, and never looked back. Texas Instruments basically handed over their share of the scientific calculator market to Sharp and Casio in the space of two years.
At least Apple has the advantage of being able to fix this in a software update.
Enter "3 + 3 * 3" in any Windows Calculator app, and see what you get! 18! (Multiplication has higher precedence than addition! Answer should be 12!)
And this is the expected result. A basic calculator doesn't take algebraic input. It does operations in the order they are received from the operator (you). Any basic physical calculator would do the same. It's on the operator to put the calculations in in the correct order. Actually doing differently would be bad since most people familiar calculators would not be expecting them to have a hidden operations queue and should be entering the calculations accordingly. Having a hidden queue would result in unexpected results. I'd never expect a 10 key to keep track of order of operations for example.
Now if you put it into scientific mode, it DOES do algebraic input and does follow proper order of operations. As expected for a scientific calculator (well one of those barbaric non-RPN ones at least).
I browse on +1 so AC's need not respond, I won't see it.
All those people were just typing the numbers wrong.
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
My first thought was that whoever programmed the calculator app did it using Common Core math techniques; then I realized if that was the case, the answer to 1+2+3 would have been something along the lines of "Purple, because bananas can't moonwalk."
This space unintentionally left blank.
the other day i was trying to add my bills together and ended up at 90,000 some dollars and was like "man that better be some fast internet"
Except that 3 + 3 * 3 does, in fact, equal 12.
If you'd typed '3 + 3 [enter] * 3 [enter]' you'd get 18.
Type in an equation, get an answer to the equation. Type in a sequence of discrete operations, get the answer to a sequence of discrete operations.
Vintage computer games and RPG books available. Email me if you're interested.
iOS is actually usually very good at prioritizing input and feedback, this seems to me like an anomaly that will get fixed. On the other hand, priority is never given to input on Android. Feedback to input can take forever sometimes.
I've seen text input slow to a crawl, letters skipped, cursor jumping everywhere, words doubling all of a sudden, it's insane. Not to mention 3 or 4 different autocorrect engines running at the same time. And even with all that autocorrect going on sometimes errors are completely missed or legitimate words are replaced by nonexistent words.
Nothing to do with eyecandy, just complete incompetence. There is absolutely no excuse for this.
Twinstiq, game news
Here, have a real Windows calc.exe bug (that's been there *forever*, across all the different versions)
sqrt4 - 2 = ?
Ah, just like in grade 8, we all just rotated our papers for trig. Oh wait...
As for the old calc.exe app, it behaved the same as the old physical ones that didn't queue up operations, and executed each operation immediately.
In that case calc should return 18 for 3 + 3 * 3, but it (on 32bit XP SP3) returns 12
How old would it have to be?
"Except that 3 + 3 * 3 does, in fact, equal 12."
Precisely. The post i responded to said it wouldn't return 12, but it does.
Except that 3 + 3 * 3 does, in fact, equal 12.
If you'd typed '3 + 3 [enter] * 3 [enter]' you'd get 18.
The Windows Calculator returns 18 in Standard and Programming modes and 12 in Scientific mode.
It must have been something you assimilated. . . .
-1.068281969439142e-19
How strange.
The UI may be shit but the UX quality is through the roof. Get with the times.
I don't know how people survived all these years without calculator animations.
The problem is that 1+2+3 is greater than 4.
Another "change for the sake of change" bug created because someone wanted to be all cutesy with the calculator. Previous version worked just fine.
Precisely. The post i responded to said it wouldn't return 12, but it does.
Calculator on XP returns 18. Calculator on Win 7 returns 18. I don't have a simple four function calculator handy, but I would bet that it gets 18, too.
This is a problem of algebraic entry vs. RPN. The former requires look-ahead to know the right answer. "If the next operator which hasn't been pressed yet is mult or div I don't do this add or sub yet ...".
The "calculator" that came stock with my Galaxy Tab doesn't do immediate operations, it records the equation you enter and then processes it when you press "=". It gets 12.
How strange.
Not strange at all. That is zero within "eps", and is because they are using the Intel or AMD math processor for the square root. WE look at "4" and know the square root is exactly two because we learned that. The CPU goes through a standard algorithm for determining the square root of a number, and because of the inherent imprecision of floating point math with a limited number of bits, the answer is not identical to zero because the square root of 4 is not identical to 2.
Common core math?
They succeeded at making a user experience, but utterly failed at making a user interface.
This is similar in a way to the bug behind the famous Therac-25 incident. The Therac-25 as a medical radiation machine which had software which was supposed to prevent patients receiving dangerous doses of radiation. However it turned out the operators entered configuration command far faster than testers did, creating a race condition that could result in the machine delivering over 100x the safe dosage.
The bug never showed up in testing because the testers never got as fast at input as the operators, and in any case the specific keystroke combination that caused it was rare.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
You know the old adage, "If it ain't broken you haven't fixed it enough."
I did exactly what you said and i got:
-8.1648465955514287168521180122928e-39
Barbie was right, math is hard.
Man i really hate windows 10 calc i have on my work pc. My workflow for calculating is Windowskey + r , type 'calc' , press enter, and then immediately start typing.
of course if you do this, the calculator takes .5 seconds to open (or more) and misses your first numerical keystrokes. This is because of a stupid animation as well. Simply not a problem on any previous version of windows. Pisses me off damn near every day.
As a potential lottery winner, I totally support tax cuts for the wealthy
the keyboard is soooo fucked up in ios11
I can type sentenses, go get a coffee and see them finish being displayed.
it's that bad
Then an 8 character type ahead buffer was introduced, probably in the DOS 3.0 time frame.
It was not universally appreciated. Jerry Pournelle, the Byte Magazine columnist went on a rant about how this type-ahead-buffer will lead to all sorts of disasters. ( cumbersome I keystrokes into one key without specifying and planning anything in advance. ... You type this repeatedly Could not find a good readable link)
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
Why nerds like us who are "sperglords" disable animation and flashy bullshit in applications and operating systems, ever since windows XP.
I've been abused countless times for it, but at the end of the day, the goddamn computing device should keep up with ME. Not the other way round. I'm extremely fast on the keyboard, I know endless shortcuts, I can get things done quickly, but I need responsive tools.
But nope, we're just "sperglords" and neck beards who should stop complaining....
No, sorry, that's just wrong by the basic rules of algebra. Multiplication gets precedence over addition. (That newfangled idea of a precedence tree in computer languages is predated by at least a hundred years in mathematics.)
3 + 3 * 3 is 12, period. If your calculator is giving you 18, it is wrong, and is the result of a lazy developer not understanding the appropriate operator precedence. Doing correct arithmetic is non-trivial (it isn't hard, but it isn't trivial: the trivial approach gives you 18 in this case, and that is wrong). This is not a question of "scientific" or "non-scientific" calculators. There is no such thing. Calculators have one kind of function, there is one correct answer,and if they don't get it right, then the designer or implementor is at fault.
Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
Some people will claim our calculator is inaccurate. We prefer to think of it as having courage...
Show me on the 1st Amendment bobblehead where the moderator touched you...
It just doesn't add up.
My ism, it's full of beliefs.
WTF mate?
I thought they taught calculator brain at Stanford... sheesh
They are on the road to the right answer which is 123, obviously. The other results are just memory errors.
You're technically correct, which I suppose is the best kind of correct.
However, most standard calculators do simple "Business Math" and act more like an adding machine, rather than following proper BEDMAS order. This is the behaviour that most people expect. Say you're adding up a dinner bill then dividing by 3 to split it 3 ways. If you were to just blindly type in 5+2+3/3 on a scientific calculator, you're going to wind up with an answer of 8, which is obviously incorrect. If you do it on a business calculator, you're going to wind up with 3.33, which is the correct answer.
...si hoc legere nimium eruditionis habes...
how was this never tested?
This bug happens 100% of the time on my family's two iPhone 5Ss on iOS 11.0.3:
Steps to reproduce:
1. Go to Calculator.
2. Turn it sideways.
3. Type in 3,003,003,003,003,003
4. Press "times", "3", "equals".
Expected result:
9,009,009,009,009,009
Actual result:
9,009,009,009,009,008
Divide by 3 and multiply by 3 and you'll get
9,009,009,009,009,006
Divide that by 3 and you'll get
3,003,003,003,003,002
My kid discovered this while playing with the app.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
Yeah I'm a Luddite it's happening on my 5s with 10.0.1 installed
Apple's qa dept has been on holidays for a while now
This behaviour happens with my iPhone 4 running iOS 7.1.2. only occurs when pressing the keys quickly, the + sign clicks but is not registered so the calculation becomes 1 + 23 or 12 + 3.
Depends. Any calculator that lets you enter “3+3*3” all in one go would certainly be wrong to return 18, but a basic calculator will usually display “6” after you press the multiply button, making it clear it’s executing operations in the order they are entered rather than proper OoO.
And the first time anyone noticed that in testing and figured out what the problem was, they should have reprogrammed the calculator to use a lookup table for all perfects squares between zero and <however many digits the calculator can display> instead of using the algorithm for those numbers. Brute-force and low-tech and "wrong" to a programmer but IT WILL ALWAYS WORK PERFECTLY. If complex FPU math loops cause your calculator app to get wrong answers for problems a grade-school kid can do, DON'T USE IT. What's better -- an elegant wrong answer or an inelegant correct answer? When it comes to math, "correct" should always win.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
Lol
I do not have and I doubt I will ever have an Iphone but I am curious does this also carry over to making phone calls, or did they do something different when a person presses the number buttons to dial a number? Though I guess apple does not expect people to dial numbers that they do not have in their contacts already.
John
If complex FPU math loops cause your calculator app to get wrong answers for problems a grade-school kid can do
The answers are correct to within the precision of the operation. A square root that is off by 1e-39 from the perfect answer of "2" is correct within any reasonable definition of precision.
When it comes to math, "correct" should always win.
A calculator isn't doing "math", which is a representation of reality and not reality itself. It is calculating numbers. And, because the hardware is a physical thing while math is a theoretical construct, for former cannot achieve perfection while the latter can. The fact that you have to represent a real number as a limited sum of powers of two means you can have an infinite number of "numbers" that you cannot possibly represent perfectly.
Your idea of a lookup table would be interesting, if it weren't unwieldly and horribly impractical.
they should have reprogrammed the calculator to use a lookup table for all perfects squares between zero and
I realize that saying that process would be unwieldly probably won't deter you, so let's use some actual numbers. Let's say you have a ten digit calculator. There are 10 billion integers that can be displayed (0-9,999,999,999). Amongst those will be 100,000 exact squares. You need to have a table of 100,000 squares and their square roots.
BUT, let's not forget, your calculator can also display 2.25, which has an exact square root of 1.5. You'll want the correct answer for that. There will be an additional 3162 "perfect squares" that are numbers of the form n.5 that will have a display of ten digits or less. There will be another 316 "perfect squares" of ten digits or less that have square roots of n.25 or n.75.
Let's call it 110,000 "perfect squares" for a ten digit display. But, wait, your calculator may have more internal precision than that 10 digits, so there will be more "perfect squares" that you need to look out for. For example, 1.0078125 has a perfect square of 1.01568603515625. A ten digit display can only display part of that, but that won't prevent you from entering it and pressing "sqrt", will it?
Your "ten digit" table will need to have more than 32 bits for each integer since you only get to four billion with 32 bits. At least 33 bits. And you'll need to search that table to find out your perfect square isn't in there.
By the time you've searched the table, if you have the memory available and want to increase the cost of your calculator to include it, you could have calculated the almost perfect answer and be off by only a very very tiny amount.
As I pointed out elsewhere, if you are doing calculations for theoretical physics and need perfect answers, do it symbolically. If you are trying to figure out how long a piece of lumber to cut for a project, use your calculator that gives good enough answers. Not even the folks creating firing tables by hand using calculators cared about 1e-39 errors.
This is why you use an arbitrary precision math library for calculators. Programmers need to take floating point precision into consideration, users shouldn't have to.
The square root of 4 is exactly 2. If anything else is presented to the user, it is a bug. And it isn't: The calculator shows 2, exactly. If you subtract 2 from 2, the result is 0, not some tiny non-zero number. If the calculator can know that sqrt(4) is 2 exactly, it can know that sqrt(4)-2 is 0 exactly. It shows something else and that is a bug. Programming is about getting things right, not about patching users through to the CPU.
Likely the sqrt is different and does not use exp(x.log y). Try it in your prefred language implementation possibly .net.
C. Sagan : A demon haunted world:
http://www.amazon.com/gp/product/0345409469/
visit randi.org
Just tried it I get 6.
Maybe I'm older and slower.
Curious that programmer mode has that precedence but really it just validates "Always use brackets"
How about (in pseudocode)
if round(result) squared = initial number then result = round(result)
Bang an X after the name, charge a thousand bucks and tell everyone that if you don't buy one you're a peasant.
Money making circa 2017.
On the old PDP-8, the first release of FORTRAN IV, (which was a monumental software accomplishment on a 8K 0.3MIPS machine), a simple DO loop would count 1, 2, 3, 5, 6, ... oops.
They quickly released a 4-word patch which fixed the problem.
I donâ(TM)t think it would be a problem if people looked at the numbers being registered. Then they would see what is actually going to be used for their calculations and hopefully make sure the correct numbers were being used.
That is all.
This would never have happened in Steve was still alive!
And some of the same people who complain about wonky interfaces like this promote the idea of smart guns.
Every time I "Go to the calculator app and quickly type 1+2+3.", I WAS getting 3 as the result...then I noticed the little button with 2 horizontal lines on it...seems to be working, now.
I just tried it, several times, and consistently got 6 as my answer.
Also just to try I did the sqrt of 2 minus 2 thing that appears to flummox windows calc users and the iPhoneâ(TM)s calc happily reports 0.
This article appears to be bullshit.
I used to have a better sig than this, but I got tired of it
There is an iOS port of my WP 34S firmward. It doesn't suffer this problem.
It is RPN, so not for everyone but it is a very well featured non-graphing calculator.
Pauli
The iOS calculator automatically changes to scientific mode in landscape orientation.
Most floating point errors, however, are because of numbers not being representable. Things like (1.0/5)*5 not being equal to 1.0. The square root of 4 is representable just fine. Unless you don't calculate sqrt(4) but rather exp(0.5*ln(4)) in which case intermediate results are not exactly representable. Which would be stupid to do when FPU and library offer sqrt.
But it might have been an actual supercomputer that can be had for a super prize and it still couldn't do math before crashing because of a memory error.
if round(result) squared = initial number then result = round(result)
round(1.5) squared is 4, which is not the initial number 2.25. Algorithm fails.
round (result squared) would be 2, also not 2.25.
I think any reasonable user is going to respond to an answer of 1e-39 with "oh, that's zero, but isn't that interesting", not "I have to make a really really tiny shim to put under that table leg to keep it from wobbling."
Well done. You translated my pseudocode into some bugged monstrosity that obviously wasn't going to work.
If the result is 1.5000000000000000000008 and displayed as 1.5 then use some common fucking sense and round it to 1.5 then square that.
Fucking imbecile.