If You Type 1+2+3 Into Your iPhone's Calculator on iOS 11, You Probably Won't Get 6 (qz.com) 337
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.
First CS assignment. (Score:5, Informative)
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?
Re: (Score:3, Interesting)
Math is hard.
In Windows, open the calculator and do this:
Take the square root of 4
Subtract 2
You should get 0, but you don't.
The calc app does some sort of weird floating point math (despite the fact that the square root of 4 is exactly 2 and no floating point math is needed) and comes up with an answer of
-1.068281969439142e-19
Math is hard
Re: (Score:3)
Someone skipped the day(s) they were teaching about how to do significant digits in Numerical Methods.
Like they had to skip a lot of days because that was the follow up conversation we had after each major section. As in how to tell what is and what isn't a good answer to the math we were just given to do.
Re: (Score:2, Informative)
Re:First CS assignment. (Score:5, Funny)
I have the Win10 Creators Edition and the calculator gave me this result: "I'm sorry Dave, I can't do that".
I knew Win10 was crap, but come on. My name's not Dave!
Re:First CS assignment. (Score:4, Informative)
It gets even weirder than that!
4 @ - 2 = -8.1648465955514287168521180122928e-39 (@ is the shortcut for clicking the square root key) .5 - 2 = 1.0605907030850721689734498566293e-38 (y is the shortcut for clicking the "x to the power of y" key)
4 y
4 y ( 1 / 2 ) - 2 = -8.1648465955514287168521180122928e-39 (y is the shortcut for clicking the "x to the power of y" key)
It even shows "0.5" after you type the closing parenthesis when doing 4 y ( 1 / 2 ). Yet the result differs compared to 4 y .5 - 2 (or 4 y 0.5 - 2).
WTFOOK MS?
Re:First CS assignment. (Score:4, Funny)
But does systemd-calcd compute the right result when you IPC it the math term via dbus?
Re:First CS assignment. (Score:5, Informative)
This isn't a math problem. It's basic programming; you don't rely on tests of equality between the results of floating point calculations and integer quantities.
What's going on here is that the sqrt function yields a floating point number that's close to the integer 2, and that's rounded for display down to 2. The round for display routine clearly chooses not to round if the difference is large relative to the amount. For example take the number 1000, and add .00000000001. It will display 1000.00000000001. Now do the same with 1,000,000; it will display 1,000,000 even though internally the number is 1,000,000.00000000001.
It's not an entirely unreasonably way of doing it, although most people would tend to round to a fixed number of digits.
Re: (Score:3)
You don't round to display in a calculator in the first place. What you get in the calculator display should reflect the true value in the accumulator.
Also, if sqrt(4.0) does not produce exactly 2.0 then there is something wrong with that code. 4.0 and 2.0 are powers of two, so there should not be any rounding when using IEEE floating point math.
Re: (Score:2)
Re:First CS assignment. (Score:4, Informative)
Wow, I could reproduce it easily in my updated 64-bit W7 HPE SP1 machine. Why hasn't MS fixed it?
The hatred for Microsoft runs deep in this group, to ignore the fact that the calculations are actually being done by an IEEE-754 [wikipedia.org] compliant floating point processor in the Intel or AMD CPU, and not by Microsoft doing it in their code.
What's fun is having an 80 bit IEEE processing unit on a 64 bit CPU. You can get different answers depending on whether the calculations are done entirely in 80 bit FPU or 64 bit CPU.
So, it isn't Microsoft's failure to fix. It's a known limitation of using a digital computer to "do math".
You might pipe back that the computer could be written to work in arbitrary precision binary coded decimal, but that leaves the problem of errors at the edge of the precision, no matter what that precision is. Even "arbitrary" doesn't mean "unlimited", both for speed and hardware constraints.
Re:First CS assignment. (Score:4, Insightful)
So, how are we expect to get the true math answers with these calculations then? :(
If you want "true math answers", do math symbolically instead of numerically.
There are entire books and courses on numerical methods that talk about doing calculations on numbers instead of symbols, how to minimize errors, and why they appear.
Re: (Score:2)
Re: (Score:3)
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?
You didn't have a GUI keyboard with animated keys.
This is why I still keep my trusty HP-15C calculator on my desk -- for when I need to do some quick arithmetic, it's still easier to use the calculator than my computer or worse (as this example shows), a phone.
Re: (Score:3)
I'm using Mathdroid, which you can get from the fdroid repo. It is easily my most used mobile app. Scrollback buffer, variable support, hitting a bare operator automatically inserts the last answer in front, etc.
Actually, it works better than any of the linux calculators I got from a distro, ever. HP-15C is nice, and I'd probably use something similar if I didn't have Mathdroid.
Re: (Score:2)
Emacs calc is the ultimate :) Actually it is.
Re:First CS assignment. (Score:5, Informative)
How does this happen?
It explains how it happened in the summary:
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.
It's not doing math wrong. It does a brief animation when you press a button, and it doesn't necessarily read the next button you press while the animation is happening. Therefore, if you press the calculator buttons too quickly, it won't register all the things you pressed. Based on the buttons you do press, it does the math correctly.
So if you press "1+2+3" it might miss the second "+" and register "1+23" and give you "24" as an answer.
Re:First CS assignment. (Score:5, Insightful)
Typical Apple. Form over function.
They already made smartphones which couldn't make phone calls, so I guess this is just one more instance in that vein.
Re: (Score:2)
Typical Apple. Form over function.
It's a bug. A stupid bug, but I'm sure it wasn't intentional and that they'll fix it.
They already made smartphones which couldn't make phone calls
I'm not sure what this is referring to. The iPod touch? If so, that's not really a fair criticism. It's not meant to be a smartphone.
Re: (Score:2)
They already made smartphones which couldn't make phone calls
I'm not sure what this is referring to. The iPod touch? If so, that's not really a fair criticism. It's not meant to be a smartphone.
He's probably referring to the "You're holding it wrong" issue that resulted in Apple shipping cases to iPhone 4 owners to mitigate an antenna problem.
Re:First CS assignment. (Score:4, Interesting)
Of course it's a bug, but how do you not see it within the first five minutes of testing? When I saw this earlier I thought the claim must be ridiculous, but it's actually more difficult to avoid this problem than it is to demonstrate it. I like my Apple stuff and I get a new iPhone every year, but iOS 11 and Mac OS High Sierra are rife with small disappointments and annoyances like this.
Re: (Score:2)
I found that I could lose a brick of connection if I licked my finger and pressed hard on the junction. Apple made a dumb decision, but the effects were seriously overblown in the media.
Re: (Score:3)
Typical Apple. Form over function.
They already made smartphones which couldn't make phone calls, so I guess this is just one more instance in that vein.
They also don't grow, or even sell, apples.
Re:First CS assignment. (Score:5, Interesting)
As a developer I can see exactly how something like this can happen, and I've had variations of it happen to me numerous times over the years. This is a case of the person writing the app making assumptions about how the user interface behaves, and these assumptions turning out to be wrong OR the interface not behaving as documented. (more likely the latter)
The person that wrote the app was probably "safe to assume" that taps on the screen will be buffered during animations and other gui actions. So the app waits for you to tap, and the user taps a coordinate on the screen and your app is notified of this. You look at the location on the screen, figure out the user pressed "2, remember it, and tell the gui to do the fade on the "2" to indicate the press was accepted. Then you go back to waiting for another tap.
If in the meanwhile, the gui is displaying the fading of the "2", the user taps "3", the interface should buffer the tap, and it can either notify the app immediately (during the animation) of the new tap, OR it can wait until the animation is done and then notify the app.
I don't know which approach the gui takes. If it notifies immediately, I would expect the app to tell the gui to stop the "2" animation and start the "3" animation, as this leads to better response time. SOME apps I've seen just linearly buffer and the app won't be notified of the "3" until the "2" is done animating. In those cases you can mash a bunch of keys and then look at the screen as they are animated one at a time until all keys are animated. This is generally considered poor design but I still see it from time to time.
So what went wrong here? There's several possibilities, depending on what the gui supports.
- the gui always disables tap detection while the specific sort of animation used on the "2" is being done
- the developer used an animation api that specifically does not buffer taps when there was a buffering api available he should have used
- the application told the gui to disable buffering during the animation (or neglected to indicate it wanted buffering, if it's not the default action)
- a bug in the app caused it to not buffer taps made while the gui was still rendering an animation
There are probably a few other possibilities but that's the 99% of it. Could be a bug in the API, could be a documentation problem with the API, could be the developer used the wrong API, or used the right API in the wrong way, or got all the information he needed but just bumbled it and lost it in this specific circumstance. There's just no way to know who to blame, and I wouldn't care to take a bet either way.
But really... a user interface bug in a calculator app makes front page news on slashdot? Must be a slow news day?
Re: (Score:3)
Re:First CS assignment. (Score:4, Informative)
It's actually the other way around - this happened for functional reasons. UIKit-based animations have an option to disable user interaction during an animation. This is switched on by default, and it has been since the very first version of the iPhoneOS SDK. It had to be switched on by default because otherwise, users who were used to double-clicking to activate things with mouse-based interfaces would trigger actions twice when double-tapping on buttons (and yes, if you watch non-technical people, absolutely loads of them double-click and double-tap even when they don't have to). Auto-disabling user interaction during animations is the smartest default.
All that's happened here is that somebody in Apple forgot to switch that option off, and it's the kind of thing that's easily missed during testing. After all, despite what people say, this isn't new to iOS 11 - the bug has been present for a couple of years now and it's only just been noticed.
Re:First CS assignment. (Score:4, Interesting)
How does this happen?
It explains how it happened in the summary...
I think the "this" refers to "shipping an obviously untested product."
Part of the problem is that we (collectively) just don't get how complex software is. Sure, a good software engineer who sits down and thinks through the implications of a change will do so, but in the modern rush to market that's a rare happening. In this case, I'm guessing something like the following happened:
That said, much as we (software engineers) don't like it, there's something to be said for shipping quickly and, sometimes, before things are ready. Users reward this behavior, and shipping quickly can mean the difference between a product or company that succeeds vs. one that fails. The saying is "you can't shine shit," but I've seen countless examples otherwise (and the Mythbusters disproved this in, well, a literal sense). I hate it; despite it, in fact. Push back against it. But it's hard to argue when there's a throng of consumers ready to spend their money on it.
So, we're relegated to having to be judicious in what we push back against. Is it safety critical? Will someone get maimed or killed by this? If it's running on an iPhone, the answer is probably no. For Apple here, the main result is a bit of embarrassment -- a calculator that seems to give wacky results. A civil engineer using this for estimating should see this kind of issue immediately (and is unlikely to use the iOS calculator for final documents). Someone trying to split their restaurant bill, maybe not, it's an acceptable risk. The Excel 2007 multiplication bug [slashdot.org] was probably more serious because that's an application that is more likely to be used in civil engineering. If you're writing software that could lethally irradiate someone [wikipedia.org] and encounter shady practices, immediately raise flags and alert everyone who will listen.
Ok, so we're not going to manually test everything on a smart phone before a new OS is released. What can we do? Push for more automation. Making aesthetic judgements automatically might still be a bit difficult, but we ought to be able to simulate key misregistrations. A quick check would be to do this in software to see the effect of a change while you're hacking away on your laptop, but a robot providing millions of taps and swipes on actual hardware would be even more insightful. This would be daunting for most startups trying to make the next Zynbookwitter on shoestring VC funding, but child's play for the likes of Apple or Google.
Re: (Score:3)
There's nothing wrong with animation. It gives feedback the same way as the click of a key on a physical keyboard. It's only the implementation that's at fault here.
Re: (Score:2)
It isn't a problem with it doing the math. It is a problem of capturing the key press. Being that the button decided to do some fancy animations I expect it just prevented the next plus button from being registered.
Re: (Score:3, Funny)
It isn't a problem with it doing the math. It is a problem of capturing the key press. Being that the button decided to do some fancy animations I expect it just prevented the next plus button from being registered.
It takes courage to provide an input buffer.
Re: (Score:2)
Because they are morons. i.e. OSX 10.10.5's Calculator app:
Enter: 88.02
Press: +/-
Will show: -88.02000000000001
Press: +/-
Will show: 88.02000000000004
This isn't rocket science just basic Computer Science. Apparently these morons haven't figured out what a sign bit is. Maybe they should talk to their iOS division ...
--
WhereTF is the default Calculator App on iPad??? You shipped one with iOS.
Re: (Score:2)
Re: (Score:2)
You'd have to RTFA to find out. Or I'll help you: there is a little animation and so the second "+" doesn't register. It's as if you hit "1 + 23".
Every input device on planet earth has some maximum rate at which it can process events. If yours is slow, that's a performance problem -- in this case it looks like it was pretty crappy because the animation had to complete before you could enter the next thing.
Re: First CS assignment. (Score:2)
Re: First CS assignment. (Score:5, Insightful)
By the time you've turned the damn thing down enough to hear, the ambulance or fire truck is up your ass, because you had to take your eyes off the road (and your rear-view mirror) to look for the spot on the screen to touch for volume in the first place.
Can we just have fucking physical knobs and buttons back, please?
Re: (Score:3, Interesting)
It may take a few lawsuits to get back to an interface which actually works while driving without requiring the user to take their eyes off the road.
Since we had a well proven system for decades and the replacement is defective by design because it's unsafe, hopefully it won't take a few juries long to award big bucks in a few high profile cases to get manufacturers to fix the error of their ways.
Normally, I'm not particularly plaintiff friendly in product liability lawsuits, but in this case the manufactur
You're typing it wrong. (Score:5, Funny)
Although I wonder if the fix would be just to be brave enough to just remove the calculator. Maths is an outdated technology anyway...
Re: (Score:3)
Re: (Score:2)
the rise of the eyecandy tards (Score:5, Insightful)
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.
Re: (Score:3)
Nah, it's just standard Apple quality control. Remember when the alarm clock stopped working? Multiple times? Over multiple years?
Apple Maps, the iPhone 4 antenna, Macbook thermal paste... Apple is just as prone to fuck ups as everyone else, it's just that theirs tend to be hilarious for some reason.
Re: the rise of the eyecandy tards (Score:3)
Re: (Score:2)
Would you prefer no feedback that the keypress registered? Physical keys give audible and tactile feedback. Just because they were doing it wrong doesn't mean it was the wrong thing to do.
Re:the rise of the eyecandy tards (Score:4)
Re: (Score:2)
Haptic feedback tells you that you pressed *a* button (if you leave it turned on). iPhone users are more likely to look at their typing finger than at the number display to see which button they pressed.
I know my main Android keyboard lights up the key in addition to the haptic feedback, and it has never prevented my continued typing.
The worst is typing in Android (Score:2)
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 completel
Re: (Score:2)
Which is exactly why the first thing I do on any computing device (be it a desktop, laptop, tablet, phone, or watch) is to turn off animations, or where that's impossible, speed them up as much as will be allowed. Makes everything feel far more responsive, and makes things actually work.
Animation is not required in a UI. And no, to those who intentionally misinterpret this, that doesn't mean you don't need feedback of actions taken, just that it doesn't need to be animated. The button turning a different co
Animation is cancer (Score:2, Interesting)
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.
Re: (Score:2)
I turn animation off on all my devices, instantly makes a 3 year old device feel faster than the newest top of the line flagship device.
Of course this being an Apple product, they probably don't allow that...
Re: Animation is cancer (Score:4, Funny)
Re: (Score:2)
And lack of Unicode support.
Only apps can app apps! (Score:2, Funny)
Apps!
Re: (Score:2)
A modern APP with a hosts file.
Lesson: Blocking UI is really bad (Score:5, Insightful)
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.
Re: (Score:2)
I expect it was a seemingly basic tweak to the existing Calculator code from iOS v. 1.0 . And it probably passed the initial Smoke test, and if they did see that problem, they probably figured that they just messed up their typing. I see it more of a fail in QA then in core architecture. These blocking events were probably put way back in 2007 or earlier, well before apple guidelines were in effect for the iPhone.
Remember the original iPhone didn't allow custom Apps. Steve Jobs wanted everyone to make
Re: (Score:2)
I found it more depressing that my old iPad 2 originally not even had an calculator.
I downloaded a free one and needed to block its access to the internet on cellular, so it stopped displaying advertisement.
I guess the fix for the current iPhone is the same: download a third party calculator app. It is probably more functional complete anyway.
Gimmicky animation is such a waste of CPU... (Score:3, Insightful)
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.
Re:Gimmicky animation is such a waste of CPU... (Score:5, Insightful)
CPU time and network time should be better spent on the really important stuff that computers are supposed to do: porn.
fixed that for you.
Re: (Score:2)
As long as they show me animated cat pictures at the same time, no problem!
If they show animated Cheetarah videos, a lot of people will even give them a VPN connection so they can plunder all your ports at once.
Unable to reproduce. (Score:3)
Re:Unable to reproduce. (Score:5, Informative)
I have an iPhone 6S on iOS 11.1 beta - and this bug is damn easy to reproduce. Why on earth does a freaking animation get precedence over a button push? More importantly, why is it even blocking at all?
I'm old enough to remember typing on remote CRT terminals which were connected to a central computer over a 300 baud line (or maybe it was 110? This was back ~ 1980-1981). Back then, if you typed reasonably fast you could get ahead of the terminal's display by a few characters... but even way back then, this was a solved problem, those additional characters didn't get lost.
Re: (Score:2)
it takes courage to ignore the customer.
New Apple (Score:5, Funny)
Here is a 1200$ super computer that fits into your pocket! Unfortunately it can't do math.
Re: (Score:2)
No it can do math just fine. I just cannot register a tap event while an animation is drawing.
None of this would have happened... (Score:2)
... if apple had stuck to it's skeuomorphic design principles.
I got 6 (Score:2)
Re: (Score:3)
I just tried it too. You have to go out of your way to do things fast enough to beat the animation, and even then if you type 1+2+3 fast enough, it will just show "23" on the screen so you'll know there was an error.
It's not like the display shows 1, then 2, then 3 but still adds 1+23. It's a minor annoyance I suppose, and should be fixed in an update, but not at all worthy of an article on Slashdot.
Not the best calculator (Score:2)
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.
Re: (Score:2)
RPN4LIFE
Brave, Innovative, Bold, Move (Score:2)
I'm happy Apple is taking so many innovative, brave, bold moves. Their emphasis on UI, and animation, is transforming the calculator industry.
Re: (Score:2)
gmail (Score:5, Interesting)
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.
No RPN no care (Score:2)
Re: (Score:2)
Something I've been wondering about: (Score:2)
Did they bury the QA team with Jobs?
Reminds me of the TI debacle of the early 80's (Score:5, Interesting)
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.
No bug. Needless Apple bashing. (Score:2)
ah ha (Score:2)
Re: ah ha (Score:2)
Change for the sake of change (Score:2)
Interesting historical note: (Score:5, Interesting)
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.
EXACTLY PRECISELY, UTTERLY (Score:3)
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....
Re:Windows Calculator (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2)
As far as I know the standard Apple calculator does not a scientific option.
Sure it does. Just put your phone into landscape mode.
Re: Windows Calculator (Score:2)
Re: (Score:2)
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).
Re: (Score:2, Informative)
Here, have a real Windows calc.exe bug (that's been there *forever*, across all the different versions)
sqrt4 - 2 = ?
Re:Windows Calculator (Score:5, Informative)
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.
Re: (Score:3)
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 i
Re: (Score:2)
Re: (Score:2)
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 une
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
"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.
Re: (Score:2)
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 pr
Re: (Score:2)
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.
Re: (Score:2)
This bothered me as well.
1 + 2 + 3
23: drop the 1 and the second +.
24: drop the second +.
16: no fucking clue, we'd need to duplicate the first one. Perhaps the author typod it and meant 15 (drop the first +).
32: no fucking clue.
Re: (Score:2)
I've never done iPhone dev, but on Android this could totally be done by designers who were given control over the animations and don't actually understand the programming at all. And if the programmers are doing their own QA (for example, in test-driven development that is required) they might not even realize there is an extra stupidity to test there because it is outside their actual specialty.
I blame the project managers for telling the designs to animate, and not telling QA to test that part extensivel
Re: (Score:2)
The app doesn't use the OS keyboard. The whole screen is a calculator and the buttons are there. And for some dumb reason it won't read those buttons while playing an animation. Despite this, I'm fairly sure that their OS keyboard animated in a non blocking way.