Slashdot Mirror


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.

207 of 337 comments (clear)

  1. First CS assignment. by Anonymous Coward · · 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?

    1. Re:First CS assignment. by Anonymous Coward · · 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

    2. Re:First CS assignment. by H3lldr0p · · Score: 2

      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.

    3. Re:First CS assignment. by burtosis · · Score: 1

      For small values of 6 this is accurate.

    4. Re:First CS assignment. by bjohnso5 · · Score: 2, Informative

      The Win10 calculator just gave me this result: -8.1648465955514287168521180122928e-39

    5. Re:First CS assignment. by hawguy · · Score: 2

      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.

    6. Re:First CS assignment. by nine-times · · 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.

    7. Re:First CS assignment. by jellomizer · · Score: 1

      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.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    8. Re:First CS assignment. by Anonymous Coward · · Score: 1

      No idea how they come up with this since the epsilon of the double-precision 2 is 4.440892098500626e-16.

      Clearly someone failed floating point math ...

    9. Re:First CS assignment. by cheesybagel · · Score: 4, 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.

    10. Re:First CS assignment. by nine-times · · Score: 1

      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.

    11. Re:First CS assignment. by Hal_Porter · · Score: 1

      Because corporations have an age like people do.

      Apple straight out of college was an effective place with Woz doing the design and Jobs doing the marketing. I.e. in human terms they were an fresh face type, straight out of college and keen to change the world.

      Apple had a mid life crisis when Jobs was fired. People like Sculley and his successors almost run it into the ground. Human terms - mid 20's crisis.

      Jobs came back and introduced OS-X and the iPhone. Apple prospered. Human terms : mid thirties prosperity.

      Now Jobs is gone and Woz is estranged. And they're making dumb mistakes like this. And, probably more importantly following the industry trend to price gouge people through built in obsolescence, removing features and unserviceability.

      Human terms : coming to the end of a tech career.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
    12. Re:First CS assignment. by sexconker · · Score: 3, Informative

      It gets even weirder than that!

      4 @ - 2 = -8.1648465955514287168521180122928e-39 (@ is the shortcut for clicking the square root key)
      4 y .5 - 2 = 1.0605907030850721689734498566293e-38 (y is the shortcut for clicking the "x to the power of y" key)
      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?

    13. Re:First CS assignment. by Anonymous Coward · · Score: 1

      Fuck you, it's a feature, not a bug.
      Signed,
      Apple.

    14. Re: First CS assignment. by Brockmire · · Score: 1

      When they say, "don't text and drive", they really mean "put the fucking phone down and don't type."

    15. Re:First CS assignment. by omnichad · · Score: 2

      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.

    16. Re:First CS assignment. by Aighearach · · Score: 2

      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.

    17. Re:First CS assignment. by UnknownSoldier · · Score: 1

      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.

    18. Re:First CS assignment. by fahrbot-bot · · Score: 2

      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.

      --
      It must have been something you assimilated. . . .
    19. Re:First CS assignment. by fahrbot-bot · · Score: 2, 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.

      --
      It must have been something you assimilated. . . .
    20. Re:First CS assignment. by david_thornley · · Score: 1

      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.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    21. Re:First CS assignment. by tsqr · · Score: 1

      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.

    22. Re:First CS assignment. by v1 · · Score: 4, 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?

      --
      I work for the Department of Redundancy Department.
    23. Re: First CS assignment. by BronsCon · · Score: 4, Insightful

      When AC says Honda, I'm assuming he means the in-dash navigation and radio. Imagine, for a moment, that you think you hear sirens, but you don't see flashing lights, so you decide to turn the radio down to hear them better. You can't really wait for a safe place to pull over to do that, since you may end up impeding an emergency vehicle before then, so you're stuck fumbling with the damn infotainment system and waiting for it to animate every... single... button... press... before... it... will... do... anything... else.

      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?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    24. Re:First CS assignment. by Anonymous Coward · · Score: 4, Informative

      Typical Apple. Form over function.

      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.

    25. Re:First CS assignment. by freeze128 · · Score: 1

      Did your app have buttons that fade out when you press them? No? Go back and do it again.

    26. Re:First CS assignment. by dacut · · Score: 3, 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:

      • "Hey, we're getting usability reports about widgets accidentally being double tapped while an app is being swapped in. What can we do to fix this?"
      • "We would need to do this in the UIKit. Maybe some visual indication it's been tapped with a lockout period?"
      • "Ok, great. We need this by next Friday to get it into the next iOS build."
      • "That's tight, but we'll manage."
      • Builds, tests... "Ok, let's see what apps use this. Calculator..." tapping deliberately "Right, looks good, results are correct. Ready to ship."

      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 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 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.

    27. Re:First CS assignment. by Wrath0fb0b · · Score: 1

      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.

    28. Re:First CS assignment. by Anonymous Coward · · Score: 1

      I haven't ever heard of someone manipulating the bits in a floating point number. That isn't something a programmer would normally do to flip the sign. Normally, they would multiply by -1.

      Also, flipping the sign bit isn't all that you'd need to do. The digits are stored in 2's complement in IEEE 754 format.

      Someone who knew basic computer science would know that.

    29. Re:First CS assignment. by hey! · · Score: 4, 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.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    30. Re:First CS assignment. by chipschap · · Score: 1

      Emacs calc is the ultimate :) Actually it is.

    31. Re:First CS assignment. by hvidstue · · Score: 2

      Win10 calculator does the same thing

    32. Re:First CS assignment. by Paradise+Pete · · Score: 4, Interesting

      It's a bug. A stupid bug, but I'm sure it wasn't intentional and that they'll fix it.

      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.

    33. Re:First CS assignment. by Mikkeles · · Score: 1

      "... if you press the calculator buttons too quickly,..."

      So: if you're not pressing it right?

      --
      Great minds think alike; fools seldom differ.
    34. Re:First CS assignment. by unrtst · · Score: 1

      Trusty old xcalc gives the correct result on all of those :-)
      As does gcalctool and gcalccmd.

      I understand (more or less) why those results are coming from the windows calculator, but this problem was solved a VERY VERY long time ago. How the hell did they allow that through?

    35. Re:First CS assignment. by fisted · · Score: 3, Funny

      But does systemd-calcd compute the right result when you IPC it the math term via dbus?

    36. Re:First CS assignment. by fisted · · Score: 1

      Thanks for insightfully repeating what TFS already said.

      And it really doesn't matter whether it's doing math wrong, or whether it's doing software wrong.

    37. Re: First CS assignment. by sexconker · · Score: 1

      Do Alt+1/2/3/4 not work?

    38. Re:First CS assignment. by fisted · · Score: 1

      ...and you found that out how exactly?

    39. Re:First CS assignment. by Strider- · · Score: 1

      Only if you do the arithmetic in reverse polish notation.

      --
      ...si hoc legere nimium eruditionis habes...
    40. Re:First CS assignment. by Lanthanide · · Score: 2

      Windows 10 with the calculator in Scientific mode gives me -8.1648465955514287168521180122928e-39

      When I put it on Standard I get your number. Interesting that there's more to Scientific mode than simply extra buttons.

    41. Re:First CS assignment. by UnknownSoldier · · Score: 1

      > I haven't ever heard of someone manipulating the bits in a floating point number.

      That's because you lack experience. A classic trick is to use an union:


      union int_float_t
      {
              uint32_t i;
              float f;
      };

      If you actually understood the IEEE754 32-bit and 64-bit format you wouldn't be so naive.

      https://en.wikipedia.org/wiki/...

      Sign bit: 1 bit
      Exponent width: 8 bits
      Significand precision: 24 bits (23 explicitly stored)

      https://en.wikipedia.org/wiki/...

      Sign bit: 1 bit
      Exponent: 11 bits
      Significand precision: 53 bits (52 explicitly stored)

    42. Re:First CS assignment. by thegarbz · · Score: 1

      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)

      How do you calculate the squareroot of 4? No seriously look it up. The squareroot of 4 is obviously 2, but how do you calculate it? Only a couple of algorithms work which don't require floating point math actually work: Getting a square root is hard: https://en.wikipedia.org/wiki/... and those that do are inefficient enough that you won't find them on a computer. ... Or an electronic calculator for that matter.

      The problem is that the answer is an approximation. The sqrt(4) gives you an answer with a shitload of zeros before demonstrating its inaccuracy so the calculator truncates it and displays it as 2. But that's not what it calculated. When you subtract 2 from it, the errors that previously appeared at the 19th decimal now are the significant digits so it gets displayed on the screen in scientific notation.

      By the way I get: 1.0605907030850721689734498566293e-38 so my windows calculator is more accurate than yours by 19 orders of magnitude. :-)

    43. Re: First CS assignment. by Anonymous Coward · · 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 manufacturer better show me if I'm on the jury that their design decision SAVED more lives than it cost and that they could not have reasonably achieved the same life saving feature without costing (fewer) other lives. That's a pretty high bar to clear!

      I actually drive an older car now and one reason is just this -- I looked at replacing it and found the UIs to basic functions in too many midrange cars to be unsafe.

    44. Re: First CS assignment. by BronsCon · · Score: 1

      The Honda in-dash radio has an "Audio" button at the top left which instantly turns the radio on or, more usefully, off.

      One tap after taking your eyes off the road to look for the button.

      Fixed.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    45. Re:First CS assignment. by techno-vampire · · Score: 1

      So what went wrong here?

      If I had to guess, it's a failure in testing, and one that I've seen more than once. The testers only test to see if it works right when used the way the designers expect it to use but never check to see what happens if the users hit a wrong key, type too fast or otherwise enter unexpected data. The reason for this is, "In a perfect world, people wouldn't do things like this." And, if you point out that this isn't a perfect world, you're lucky if all you get is a dirty look.

      --
      Good, inexpensive web hosting
    46. Re:First CS assignment. by nctritech · · Score: 1

      Windows 10 Pro build 1607 "calc.exe" invoked WIndows 10 app shows the e-19 number. Can't speak for other builds or apps. Obligatory: appy app app apps, LUDDITE.

    47. Re:First CS assignment. by edx93 · · Score: 1

      It's the speed, not the logic or computation: do 1+1+1 rapidly, you'll get the same problem. Do it slowly, and you'll be fine. That being said, this is a silly oversight. Should not have happened.

    48. Re:First CS assignment. by jittles · · Score: 1

      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?

      Based on my experience with iOS 11, I suspect that only 1 in 10 or maybe 1 in 20 of the people working on the release have even implemented a Hello World function. Worst release ever. I have to restart my device about 15 times a day because the UI locks up completely and I can't do anything. And it starts doing that about a week after installing the update / factory resetting the device.

    49. Re:First CS assignment. by slashrio · · Score: 1

      I hate delays in my work flow caused by idiots who want to show how flashy their UI can act.

      --
      "Trump!!", the new Godwin.
    50. Re:First CS assignment. by Anonymous Coward · · Score: 1

      This is a very different issue. The fact that square roots can only be approximated in general is not news. Nor is the fact that a particular calculator application doesn't do special-cases for square roots which have known, exact results.

      You just shouldn't expect exact answers from numerical calculations. (And this isn't "weird", it's the way essentially every computer and calculator ever does these calculations, except that maybe some do special cases for answers with exact results.)

      But it's a completely different thing to undermine an application in order to display a worthless animation.

    51. Re:First CS assignment. by Dread_ed · · Score: 1

      Pretty sure it started by licking his finger...

      --
      When the only tool you have is a claw hammer every problem starts to look like the back of someone's skull.
    52. Re:First CS assignment. by Gr8Apes · · Score: 1

      The reason for this is, "In a perfect world, people wouldn't do things like this." And, if you point out that this isn't a perfect world, you're lucky if all you get is a dirty look.

      The dirty look should be saved for the mirror. In a perfect world, the device handles how fast I type. Period.

      --
      The cesspool just got a check and balance.
    53. Re:First CS assignment. by techno-vampire · · Score: 2

      And for that matter, in a perfect world, the testers wouldn't be told how the devs expected the software to be used. Instead, they'd be expected to mess around with it, use it in unexpected ways (not that typing too fast should be unexpected) and try to make it fail.

      --
      Good, inexpensive web hosting
    54. Re:First CS assignment. by DontBeAMoran · · Score: 4, 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!

      --
      #DeleteFacebook
    55. Re:First CS assignment. by antdude · · Score: 1

      Wow, I could reproduce it easily in my updated 64-bit W7 HPE SP1 machine. Why hasn't MS fixed it?

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    56. Re:First CS assignment. by antdude · · Score: 1

      Maybe Apple already knows about and doesn't consider it a high priority bug. When I did SQA testings, I saw a lot of crazy issues. Lots of them don't get due to lack of resources like times, developers, etc. :(

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    57. Re:First CS assignment. by Anonymous Coward · · Score: 1

      Only a game developer or someone who never learned how to write a GUI would think like that. Everyone else would use button widgets and any application developer who goes low enough to have to manually deal with UI input queues rather than component events should be fired. There should be no reason for anyone to be manually translating screen coordinates to component locations. Are the iOS controls/API really that primitive? It's worse than poor design, it's cutting down a tree and spending a week turning it into a small raft to cross a short river instead of walking three more feet down the road and using the existing bridge. And then your raft sank when you were half way across.

      The animations are probably playing on the same thread as the one processing input and thus it can't do both at the same time. This is an architecture flaw in iOS' UI toolkit. Non-games shouldn't even have an API to be able to block things like this. Without the low level API, the only way to do it would be to disable all buttons once one is depressed and then re-enable them when the animations finish. But then that would also mean the app developers changed what the disabled UI state looked like so all the buttons wouldn't flash when you're using it.

    58. Re:First CS assignment. by DutchUncle · · Score: 1

      I do embedded systems using an RTOS. I can track inputs at the same time as I'm updating a screen and communicating on three RS485 serial lines and a CAN line. How can Apple fail to keep up when they have about 8x as many cycles and 16x as much RAM as I have?

    59. Re:First CS assignment. by Obfuscant · · Score: 3, 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 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.

    60. Re:First CS assignment. by Darinbob · · Score: 1

      Because companies continue to use novices for applications that seem easy or boring, without sufficient oversight. Maybe they spent all their money on expensive UX experts but paid only peanuts for the actual implementation. The QA probably also skimped and focused on whether it looked nice and animated properly, but withouth a use case of a customer hoping to correcty do a calculation.

      Besides, it's an iPhone. Apple didn't lose any customers over the "you're holding it wrong" antenna problem, so I don't think they're worried about the calculator and the "you're tapping it wrong" problem.

    61. Re:First CS assignment. by antdude · · Score: 1

      So, how are we expect to get the true math answers with these calculations then? :(

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    62. Re:First CS assignment. by Darinbob · · Score: 1

      Again, same problem at on Apple. They don't put good developers on applications that project management thinks are easy. Problem there is you don't put a new hire or intern to work on a calculator that intended to be accurate; too many people come out of school thinking that floating point is a magic black box that always does the right thing and you don't need to know any numerical analysis to use it.

      Never mind that people got this right on the first microchip based calculator which was on a fricking 4-bit cpu! The reason they got it right is because you can't do math on a 4-bit cpu without actually *knowing* math. They had the proper domain knowledge for the application they were writing.

    63. Re: First CS assignment. by Darinbob · · Score: 1

      And so the line managers and product managers think they can assign any old programmer to the task. They probably thought the GUI was the hard part.

    64. Re:First CS assignment. by Darinbob · · Score: 1

      Also weird - the Standard view in the calculator gives a different answer from the Scientific view!

    65. Re:First CS assignment. by Obfuscant · · Score: 3, 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.

    66. Re:First CS assignment. by antdude · · Score: 1

      Wow, that's technical. :(

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    67. Re:First CS assignment. by Obfuscant · · Score: 1

      Math is a technical subject, as are numerical methods. It's the guts of a computer, did you think it would be baling wire and spit?

    68. Re: First CS assignment. by Gadget_Guy · · Score: 1

      My phone is still on iOS 10 and it's affected by this bug.

      I have two iPhones in front of me; one with iOS 10 and one with iOS 11. I can easily trigger the bug on 11, but can't make it work at all on 10.

    69. Re:First CS assignment. by Zorpheus · · Score: 1

      It is rounding to a fixed number of significant digits, which is the only right thing to do with floating point numbers.

    70. Re:First CS assignment. by Golden_Rider · · Score: 2

      The issue is that the number buttons in the calculator behave differently from the operator buttons. If you look closely, you will see that if you hit a number button, it will fade out immediately after being clicked. But if you e.g. hit the "+" button, it will STAY highlighted, probably to remind you of what operation you selected (and that you actually HAVE selected something) while thinking about what number to put in next. Only if you then hit a number button, the "+" button will fade out, which takes about half a second, and while it does this, it does not register another click on that specific button. So you could put in 1+2-3, but you cannot put in 1+2+3 without first waiting for the "+" button to fade out completely.

    71. Re:First CS assignment. by JackieBrown · · Score: 1

      Use your slide ruler

    72. Re:First CS assignment. by The+MAZZTer · · Score: 1

      AFAIK square root is usually estimated. So if you try a square root calculation that you expect an exact answer from you will be disappointed. It's not the calculator app.

    73. Re: First CS assignment. by BronsCon · · Score: 1

      YOU might. I won't, because I'm not familiar with the layout of the display. What about literally ever other function, though?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    74. Re: First CS assignment. by BronsCon · · Score: 1

      In fairness you're moving the goal posts here.

      After reading why you think that, I don't believe that I am, but I'm open to being shown otherwise.

      One tap, one twiddle, one push of a button: it's all the same, whether the tap, twiddle or push location is in a row or column of physical buttons around your stereo or on the screen of the infotainment system.

      If you 'know', by muscle memory experience, where the physical knob is you can learn, in the same way, where the screen location is.

      You can feel your way around physical knobs and buttons; not so with a flat touch screen. Even moreso in a moving vehicle, where you have to compensate for vertical and lateral inertia, or a car driven by two people who prefer the seat in different positions (so it's never really in the same place), all of which renders muscle memory useless.

      The basis on which I'm supposedly moving the goal posts is just plain incorrect. Further, the goal posts were set by the AC who said

      My Honda has a similar issue. The animations mean i have to wait for it to finish before selecting the next item. Fun while driving.

      That is, this was never limited to the volume buttons, or the on/off button; I merely used volume as an example and an AC countered with a different example, but the goal posts, which are simply not mine to move, have remained where they were.

      I'll agree: over-busy infotainment screens are dangerous / bad; multi-layer menus can be dangerous / bad / annoying; lack of tactile feedback is bad / annoying.

      Let me ask you, what makes those screens dangerous? Is it that you have to take your eyes off of the road to see what you're doing on them? I can't think of anything else, so I'm asking, but I'll continue on the assumption that I am correct, because I know taking your eyes off the road ever while driving is dangerous and I know muscle memory is useless with these displays, compounded by the fact that I'm not even the source for that hypothesis but, rather, and trumpeting (after some careful analysis of the claim) what I've heard countless others who actually have these things in their vehicles say. If you can show me otherwise, please do.

      Pointless and ungrounded complaints - they're bad / annoying too...

      By the above assumption, I don't believe that my complaint was unfounded. Pointless? Perhaps, if you ignore the fact that I have to share the road with people whose vehicles literally coerce them to take their eyes off the road while driving, or that I may want to buy a new car eventually and would like there to be knobs and buttons, rather than a screen, on the dash when I do. Raising the complaint here would be pointless, except that I come here for discussion, and the complaint started one, I come here to have my views and beliefs challenged, and you've just done that, and I come here to be entertained, which was taken care of by your laughable claim that I've "moved the goal posts".

      As of this moment, the "complaint" which you write of has 3 Insightful moderations and no others. A pointless and ungrounded complaint is not insightful; at least three* other people read what I wrote and thought to themselves "yeah, I've experienced that", that's the point of what I wrote, that's the ground on which it is built.

      --

      *: At least three people with mod points. Statistically speaking, that number will be much higher. Only about half of people actually use their mod points, only about 1% of active users have them at any given time, and only 20% of active users read a given front page article on average. From that, knowing that there are a bit over six million users and that roughly 10% of them still regularly active on the site, we can extrapolate how many moderators read my comment and, from that (and the number of moderations), how

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    75. Re:First CS assignment. by RonTheHurler · · Score: 1

      I was also a developer, for IBM back in the 1990s. Somehow, back then we did a whole lot of usability testing that just doesn't seem to be done anymore. At all. I have this exact same problem with the phone app when it shows the little number in the red circle. If I check the status too quickly, I see the animation so I know the touch was received, but the number doesn't update.

      Here's a thought -- can we have a "FEATURE" in the settings to TURN OFF all that annoying, time wasting animation crap? I mean, it's cute, it looks nice in the ads, kids like it, but get real, it's like the "kitchen of the future" videos from the 1950s. No one wants to wait around while the robotic cabinetry reveals the toaster. How convenient?

      I want my electronics responses to be instantaneous. Animations be gone!

    76. Re:First CS assignment. by petervandervos · · Score: 1

      So what went wrong here? If I had to guess, it's a failure in testing, and one that I've seen more than once. ...

      My guess would be it worked perfectly while testing, but with the update of the calculator (part of the OS updating) lots of other things got updated also, making the calculator become unresponsive while doing the animations.

    77. Re:First CS assignment. by retchdog · · Score: 1

      uh, he's trolling.

      but numerical methods are really fascinating. for example, one of the asymptotically-fast multiplication algorithms uses discrete fourier transforms to work in a modulo field both faster and with fewer intermediate rounding steps. https://en.wikipedia.org/wiki/...

      --
      "They were pure niggers." – Noam Chomsky
    78. Re:First CS assignment. by mcswell · · Score: 1

      I understand your points, but it is the case that on the gubuntu calculator, the answer comes out correct (0). I double-checked that it does reals. So perhaps there's s.t. down in its guts that rounds a number.

    79. Re:First CS assignment. by mcswell · · Score: 1

      Got one on my desk, in case anyone wants to borrow it. (And yes, I know how to use it.)

    80. Re:First CS assignment. by mcswell · · Score: 1

      There are ways around this problem; the gubuntu calculator gives the correct answer (0). Not sure how it does that internally, presumably some kind of rounding.

    81. Re:First CS assignment. by Blymie · · Score: 1

      No no.. it's systemd. RPN is too 'old'. It's Forward polish notation.

    82. Re:First CS assignment. by thegarbz · · Score: 1

      I was bored at work today. Turns out I was wrong with the floating points. Windows calculator uses quotient of integers to represent numbers which introduces its own set of errors.

      Gnome calculator uses digit by digit calculation. It's a searching algorithm that's actually quite a slow but you're bashing numbers into a screen here, not generating bitcoins so the slow speed isn't an issue. It also terminates so it's just fine if you truncate the output to a reasonable set of decimals. In my engineering degree one of our assignments was we had to make a scientific calculator. This was the default algorithm everyone tried (including me) and we quickly found that in a few bytes of code the slow 8bit processor both took forever to get lots of significant digits, and the algorithm also used up all the memory leaving none for other functions. The lecturers tested out product using large numbers (which truncated quickly), and numbers resulting in small answers which then exposed the students who just copied what math.h used.

      Anyway it's fine for computers, but no so fine for something like a pocket calculator from the 80s. Since so much of math is based on exponents, calculators emphasise algorithms for computing exponents and then solve square roots via the exponential identity. For whatever reason Windows calculator also solves squareroots using the natural identity and

      e^(0.5*ln(4)) = 1.999999999999999999999999999999999999991835153404448571283147881 (it gets longer but I got errors trying to post :-) )

      subtract 2 you get -1.0605907030850721689734498566293e-38

      The reason you got -1.068281969439142e-19 is because your calculator was in standard mode but mine is set to scientific, and windows doubles both the calculation precision and the number of significant digits display (from 16 to 32).

      So it comes down to the method used (speed vs computational time trade-off) and the number of displayed digits. Ironically enough the Windows calculator is the one that calculates more like a traditional pocket calculator, the only difference is that it keeps the answer in a higher precision that it displays it on screen.

    83. Re:First CS assignment. by thegarbz · · Score: 1

      *That natural log precision also depends on how windows calculates the exponential function.

    84. Re: First CS assignment. by thegarbz · · Score: 1

      The problem comes to the calculator storing numbers in a way that gives more precision than its capable of displaying. But storing that precise number in memory.
      Sqrt(4) in windows is apparently stored as 55604229018504692596833125437922908794411 over 27802114509252346298416562718961454397319 which on a display that only shows 32 digits comes out as 2.

      The question is just how do you want to lose precision? Making a calculator less precise by arbitrarily truncating an answer to make an imprecise number look more precise in a few select scenarios is not a sensible approach.

      Sensible would be to simply calculate digit by digit and throw processing power at the problem since that algorithm will terminate.

    85. Re: First CS assignment. by Desty · · Score: 1

      Obviously the GUI *was* the hardest part, because that's what they broke.

    86. Re: First CS assignment. by Darinbob · · Score: 1

      For the Microsoft example, the GUI works just fine.
      For the iPhone example, the GUI only broke because they did too much. There's no need for the extra animation, and clearly they focused their testing on whether it looked nice instead of whether it worked. If they kept the calculator simple it would have been a better product. This is a UX flaw.

    87. Re:First CS assignment. by Aighearach · · Score: 1

      As a daily emacs user I couldn't disagree more! lol

    88. Re:First CS assignment. by jeremyp · · Score: 1

      Forward Polish notation is just called Polish Notation

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    89. Re:First CS assignment. by jeremyp · · Score: 1

      Yes it is a bug, but it has been there at least since the first beta of iOS 11. They've had all the betas, the GA release and three point releases and it's still not fixed. I think the main reason is that the iOS calculator app is just a toy. It probably caught the engineers by surprise that anybody would care enough about it to make a fuss.

      Thanks to all the publicity, they're going to have to fix it now. Frankly, they should have foreseen this.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    90. Re:First CS assignment. by jeremyp · · Score: 1

      It was noticed and reported during the first beta of iOS 11. If it's so easy to fix, why haven't they?

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    91. Re:First CS assignment. by arglebargle_xiv · · Score: 1

      "You're typing it wrong".

    92. Re:First CS assignment. by n329619 · · Score: 1

      I can't see exactly how something like this can happen without being inexperienced or incompetent.

      In software, the most crucial feature should be working before any animation. In this case, none of the taps animation should have the control factor to the actual command.

      It feels like if I took out all the animation from that app and run it, that simple calculator would return a lot of fatal errors right on the spot.

    93. Re:First CS assignment. by Askmum · · Score: 1

      You found a method to get a square root easily!?! It has dumbfounded met since years that there is no key for that, but there is one for a cube root. What's also stupid is that all trigonometric function go to their inverse when you press the Inv key, but for some reason they did not find that necessary to implement for the square key. How logical is it that the inverse of square is square root and how stupid is it not to implement that.
      Sometimes you really ask yourself if people actually use the software that they write... even once.

    94. Re:First CS assignment. by Obfuscant · · Score: 1

      uh, he's trolling.

      I don' t think that people who don't understand computer "math" are trolling when they think they can get perfect precision because it is "a computer" and it is supposed to always give the perfect answers to "simple" problems. They're part of the generation that doesn't understand the tools they use and are shocked, I say, shocked when the "computer" tells them something that isn't perfect. That applies to "math", and to the sudden awareness that "the internet" is filled with sources that aren't vetted by experts and sworn to tell the truth, the whole truth, and nothing but the truth.

    95. Re:First CS assignment. by ponraul · · Score: 1

      Apple makes it a point to hire women. Women are bad at math. This shouldn't surprise anyone.

    96. Re:First CS assignment. by nine-times · · Score: 1

      Oh, if so, that's still not really a fair criticism. I owned that phone. It made phone calls just fine. I get that some people had some problems with it, but it was definitely blown out of proportion, and it was not at all a "smartphone which couldn't make phone calls".

    97. Re:First CS assignment. by Misagon · · Score: 2

      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.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
  2. You're typing it wrong. by aix+tom · · 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...

    1. Re:You're typing it wrong. by Killall+-9+Bash · · Score: 2

      Math isn't outdated. The calculator interface is outdated. You should just ask Siri what 1+2+3 equals.

      --
      "Prediction: within 10 years, Windows will be a Linux distribution." Me, 7-6-2016
    2. Re:You're typing it wrong. by TykeClone · · Score: 1

      You might get 23, or 24, or 16, or 32

      --
      A fine is a tax you pay for doing wrong and a tax is a fine you pay for doing all right.
  3. the rise of the eyecandy tards by iggymanz · · 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.

    1. Re:the rise of the eyecandy tards by AmiMoJo · · Score: 2

      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.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    2. Re:the rise of the eyecandy tards by omnichad · · Score: 1

      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.

    3. Re: the rise of the eyecandy tards by Brockmire · · Score: 2

      To me, nothing tops GotoFail. Though, I still believe that was intentional since their explanation of patching caused it doesn't fail spectacularly like they claim. But it does mean, their development and QA process is shitty.

    4. Re:the rise of the eyecandy tards by BronsCon · · Score: 3

      Well, given that the feedback in this case is a button animation, I must be looking at the screen in order to see it... so the digits on the calculator display changing might give me some clue that my input was registered. Beyond that, the haptic feedback already provided by the phone does a fine enough job of letting me know my input was received.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    5. Re:the rise of the eyecandy tards by green1 · · Score: 1

      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 colour when you press it makes sense, but it fading to and from that colour while the rest of the UI just sits and waits for it to finish is ridiculous, serves no purpose, and causes your brand new top of the line device to feel like it's 10 years out of date. Unfortunately it's also the norm for almost all OSes at this point.

    6. Re:the rise of the eyecandy tards by omnichad · · Score: 1

      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.

    7. Re:the rise of the eyecandy tards by BronsCon · · Score: 1
      Your question was

      Would you prefer no feedback that the keypress registered?

      I was pointing out that there is, in fact, other feedback that the key press was registered.

      After sampling a moderately-sized group of both iOS and Android users, I have discovered that most of them watch the screen of their phone's calculator while using it, just as with the el-cheapo desk calculator most of them have. It's learned behavior, as those el-cheapo calculators don't always register a press despite the key physically moving and hitting the end of its travel. That said, even the fastest-typing iOS users I know were hard-pressed to recreate the issue in this article, even after I eventually told them why I was having them do the simplest of math on their phone, rather than in their head; most of them even actively tried to get it to fuck up and couldn't.

      Sad that this bug happened, but you have to be pretty damn quick to trigger it.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    8. Re:the rise of the eyecandy tards by omnichad · · Score: 1

      I was pointing out that there is, in fact, other feedback that the key press was registered.

      And I was differentiating between "a" key and "the" key.

    9. Re:the rise of the eyecandy tards by BronsCon · · Score: 1

      if I press "2" and a "3" appears on screen, I know the keypress didn't register...

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    10. Re:the rise of the eyecandy tards by omnichad · · Score: 1

      Most people aren't able to tell which key their finger is on without looking at their finger to put it in the right place. It takes much longer to look up and see what shows up at the top of the screen. I know if I'm looking down, it will be for speed and my eyes will be on the keys.

      Physical keypads have braille dots to tell you where your fingers are. Even with haptic feedback, it's a single finger operation for most people on a touch screen.

    11. Re:the rise of the eyecandy tards by BronsCon · · Score: 1

      What's your sample size? I farmed this little experiment out to a few dozen people I know and the results were more or less unanimous.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    12. Re:the rise of the eyecandy tards by omnichad · · Score: 1

      I'm extrapolating from a concrete sample size of one. All it takes is one to prove the point. Everyone else is wholly unaffected by the lack or presence of the visual feedback - except in the case of implementation bugs.

    13. Re:the rise of the eyecandy tards by BronsCon · · Score: 1

      I must be missing your point, then, and you're clearly missing mine.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    14. Re: the rise of the eyecandy tards by AmiMoJo · · Score: 1

      I'm still ranking Apple Maps. How often can a bug in consumer software be bad enough to kill you? Bad enough that the police warn you not to use it.

      Better yet, what prevented people from actually dying was Apple Maps overnight infamy as it became the worst disaster in tech since the iPhone 4 antenna.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  4. Animation is cancer by Anonymous Coward · · 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.

    1. Re: Animation is cancer by Megane · · Score: 3, Funny

      Can we add smart quotes to that list?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    2. Re:Animation is cancer by green1 · · Score: 1

      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...

    3. Re: Animation is cancer by HyperQuantum · · Score: 1

      And lack of Unicode support.

      --
      I am not really here right now.
  5. Only apps can app apps! by Anonymous Coward · · Score: 2, Funny

    Only LUDDITES want LUDDITE accurate numbers! Modern app appers want appy numbers that let them app apps while apping other apps!

    Apps!

    1. Re:Only apps can app apps! by rudy_wayne · · Score: 1

      A modern APP with a hosts file.

  6. Lesson: Blocking UI is really bad by SuperKendall · · 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.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Lesson: Blocking UI is really bad by jellomizer · · Score: 1

      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 HTML 5 Web Applications, which Safari ran.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Lesson: Blocking UI is really bad by angel'o'sphere · · Score: 1

      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.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Lesson: Blocking UI is really bad by jittles · · Score: 1

      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.

      I wouldn't be surprised if there was an OS level bug causing this issue. I feel like iOS 11 animations are incredibly slow. The UI is slow in general. I have an iPhone 7 and I find my UI locks up completely about 15 times a day. I have to actually restart my phone (or wait about 5-6 minutes) before I can do anything. It happens a lot more frequently if I am streaming audio over bluetooth. Since this is basically the only way to listen to audio while charging an iPhone 7, Apple has really screwed up. They've gotten worse and worse about cherry-picking code fixes from the last iOS version into the latest. Their QA and development quality has really fallen flat on its face.

      I also have an Apple TV. Whatever the latest (non-4K) version is. The newest software cannot stream video over Wi-Fi. After about 30-60 minutes, the stream pauses, network fails, and I have to reboot the device to get it to work properly. However, if I watch the same stream on my iPhone and AirPlay it to the Apple TV, it can play forever without problem. It did not used to behave that way at all. The current state of Apple is just downright awful.

    4. Re:Lesson: Blocking UI is really bad by careysub · · Score: 1

      Being a real nerd I only RPN calculators - I hate algebraic ones - and usually download an HP-11 emulation for familiarity. Plus I need the more advanced math functions.

      --
      Starships were meant to fly, Hands up and touch the sky - Nicky Minaj
  7. Gimmicky animation is such a waste of CPU... by acroyear · · Score: 2, 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.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
    1. Re:Gimmicky animation is such a waste of CPU... by rudy_wayne · · Score: 4, 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.

    2. Re:Gimmicky animation is such a waste of CPU... by Aighearach · · Score: 1

      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.

    3. Re:Gimmicky animation is such a waste of CPU... by Waccoon · · Score: 1

      If software is designed like shit and not properly tested before release, all the updates in the world won't fix a damn thing.

      Today's definition of "rapid release" is not the same thing as the old UNIX "release early, release often".

  8. Unable to reproduce. by Kenja · · Score: 2

    Bug status : rejected.

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
    1. Re:Unable to reproduce. by 93+Escort+Wagon · · Score: 4, 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.

      --
      #DeleteChrome
    2. Re:Unable to reproduce. by zlives · · Score: 1

      it takes courage to ignore the customer.

  9. But... by Anonymous Coward · · Score: 1

    that animation is sexy as hell!!

    worth it

  10. New Apple by DarthVain · · Score: 4, Funny

    Here is a 1200$ super computer that fits into your pocket! Unfortunately it can't do math.

    1. Re:New Apple by jellomizer · · Score: 1

      No it can do math just fine. I just cannot register a tap event while an animation is drawing.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:New Apple by Anonymous Coward · · Score: 1

      It will be fixed in iPhone XI, where the 128-bit A12 processor will be able to animate the button-fade quicker in order to register your key presses.

  11. None of this would have happened... by Lab+Rat+Jason · · Score: 1

    ... if apple had stuck to it's skeuomorphic design principles.

    --
    Which has more power: the hammer, or the anvil?
  12. Duh by Anonymous Coward · · Score: 1

    You're holding it wrong.

  13. I got 6 by OffTheLip · · Score: 1

    Does that mean my iphone is working correctly or incorrectly by Apple standards.

    1. Re:I got 6 by clonehappy · · Score: 2

      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.

  14. Not the best calculator by Cigaes · · Score: 1

    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.

    1. Re:Not the best calculator by EvilSS · · Score: 1

      lol Wooosh!!


      RPN4LIFE

      --
      I browse on +1 so AC's need not respond, I won't see it.
  15. Brave, Innovative, Bold, Move by brian.stinar · · Score: 1

    I'm happy Apple is taking so many innovative, brave, bold moves. Their emphasis on UI, and animation, is transforming the calculator industry.

    1. Re:Brave, Innovative, Bold, Move by Type44Q · · Score: 1

      Apple gives you more for less!

  16. Re:Windows Calculator by sqorbit · · Score: 3, Insightful

    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
  17. gmail by Misagon · · 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.

    --
    "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
  18. Animations by zenbi · · Score: 1

    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

    1. Re:Animations by omnichad · · Score: 1

      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.

  19. Re:Windows Calculator by TrancePhreak · · Score: 1

    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[-
  20. Re:Windows Calculator by MiliusXP · · Score: 2

    On Win 10 standard calculator ==> 18 Scientific calculator ==> 12

  21. Re:Windows Calculator by TimHunter · · Score: 1

    On an iPhone, holding the phone sideways (landscape orientation) changes the calculator app to a scientific calculator. Parens and trig functions are available.

  22. Re:Windows Calculator by mr.hawk · · 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.

  23. No RPN no care by EvilSS · · Score: 1

    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.
    1. Re:No RPN no care by JeffTL · · Score: 1

      I use a 12C emulator on mine, and it adds at speed just fine.

    2. Re:No RPN no care by PPH · · Score: 1

      Still can't beat the nice mechanical feel of the actual calculator buttons.

      --
      Have gnu, will travel.
    3. Re:No RPN no care by EvilSS · · Score: 1

      Those HP buttons were so amazing. I still have my 48g and at my desk. I'll be buried with that calculator.

      --
      I browse on +1 so AC's need not respond, I won't see it.
  24. Re:Windows Calculator by sexconker · · Score: 1

    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).

  25. Re:Reader math as good as Apple math by sexconker · · Score: 1

    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.

  26. Something I've been wondering about: by ChoGGi · · Score: 1

    Did they bury the QA team with Jobs?

  27. Reminds me of the TI debacle of the early 80's by timholman · · Score: 4, 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.

  28. Re:Windows Calculator by EvilSS · · Score: 1

    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.
  29. No bug. Needless Apple bashing. by 140Mandak262Jamuna · · Score: 1

    All those people were just typing the numbers wrong.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  30. ah ha by bobmajdakjr · · Score: 1

    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"

    1. Re: ah ha by Brockmire · · Score: 1

      Fast Internet? You should be expecting a bus load of hookers and coke.

  31. Re:Windows Calculator by SuiteSisterMary · · Score: 1

    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.
  32. Re:Really, really dumb coders... by Aighearach · · Score: 1

    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 extensively. It should be predicted that the programmers didn't expect the designers to even want to do something so horrible, and so didn't plan for it. A project manager should understand that as soon as they hear the word "animation."

  33. The worst is typing in Android by HalAtWork · · Score: 1

    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.

    1. Re:The worst is typing in Android by iggymanz · · Score: 1

      hmmm, my moto x pure doesn't do those things, maybe you saw a StupidPhone.

    2. Re:The worst is typing in Android by iggymanz · · Score: 1

      apps with adware / spyware / social media connections / high rate of "phone home" will do that

      having more than one spell checker running will

      I stick to basic useful stuff, my running my phone like most run windows desktops

  34. Re:Windows Calculator by eggz128 · · Score: 1, Informative

    Here, have a real Windows calc.exe bug (that's been there *forever*, across all the different versions)

    sqrt4 - 2 = ?

  35. Re: Windows Calculator by Brockmire · · Score: 1

    Ah, just like in grade 8, we all just rotated our papers for trig. Oh wait...

  36. Re:Windows Calculator by vux984 · · Score: 1

    "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.

  37. Re:Windows Calculator by fahrbot-bot · · Score: 1

    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. . . .
  38. It's all about UX now by Anonymous Coward · · Score: 1

    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.

  39. Change for the sake of change by FerociousFerret · · Score: 1

    Another "change for the sake of change" bug created because someone wanted to be all cutesy with the calculator. Previous version worked just fine.

  40. Re:Windows Calculator by Obfuscant · · Score: 1

    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.

  41. Re:Windows Calculator by Obfuscant · · 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.

  42. Interesting historical note: by hey! · · Score: 4, 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.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  43. windows 10 calc does this too by citylivin · · Score: 1

    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
  44. keyboard by Spaham · · Score: 1

    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

  45. Keyboard without type ahead buffer by 140Mandak262Jamuna · · Score: 1
    It might come as a big surprise to you young whipper snappers, but yes, there was a time, the keyboard did not have type ahead buffer. You press a key, and till the computer finishes processing that input it you can not enter the next key. M.u.s.t .t.y.p.e. very slowly.

    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
  46. EXACTLY PRECISELY, UTTERLY by AbRASiON · · Score: 2

    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....

  47. Re:Windows Calculator by pz · · Score: 2

    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.
  48. Courage by chiefcrash · · Score: 1

    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...
  49. We looked into this bug by MrKaos · · Score: 1

    It just doesn't add up.

    --
    My ism, it's full of beliefs.
  50. Re:Windows Calculator by Strider- · · Score: 1

    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...
  51. Re:Reader math as good as Apple math by Strider- · · Score: 1

    Maybe it's the result of "New Math?" https://www.youtube.com/watch?...

    --
    ...si hoc legere nimium eruditionis habes...
  52. Also: it's broken. by sootman · · Score: 1

    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.
    1. Re:Also: it's broken. by Ron+Goodman · · Score: 1

      That doesn't surprise me at all. It's just rounding errors accumulating. Not the same issue as the article is talking about.

    2. Re:Also: it's broken. by sootman · · Score: 1

      Did you read my steps? How do you get a rounding number when you multiply A by B and then divide by B? You should get A, period.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  53. Not only iOS 11 by tomacsh · · Score: 1

    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.

  54. Re:Windows Calculator by sootman · · Score: 1

    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.
  55. Hey, new math! by CarterMeyers · · Score: 1

    Lol

  56. does the phone dialer keypad also have this issue? by John+Bodin · · Score: 1

    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
  57. Re:Windows Calculator by Obfuscant · · Score: 1

    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.

  58. Re:Windows Calculator by Obfuscant · · Score: 1

    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.

  59. Re:Really, really dumb coders... by gweihir · · Score: 1

    You mean the framework used is to utterly bad that designers can break the functionality of the code without ever touching it? In that case, sack the coders that did the framework for even worse incompetence. And while many, many fuckups are the fault of management, sometimes it _is_ stupid coders.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  60. Re:Windows Calculator by Waccoon · · Score: 1

    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.

  61. different algorithm by aepervius · · Score: 1

    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
  62. Re:Windows Calculator by Cederic · · Score: 1

    Curious that programmer mode has that precedence but really it just validates "Always use brackets"

  63. Re:Windows Calculator by Cederic · · Score: 1

    How about (in pseudocode)

    if round(result) squared = initial number then result = round(result)

  64. Rubbish. by davesag · · Score: 1

    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
  65. Re:Windows Calculator by Obfuscant · · Score: 1

    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.

  66. Re:Windows Calculator by Obfuscant · · Score: 1
    As I already pointed out, even with so-called "arbitrary precision", you can run into precision errors. No physical device can have INFINITE precision, they all have some upper limit. For a trivial example, take the square root of two, square it, subtract two, and see what your result is.

    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."

  67. Re:Windows Calculator by Cederic · · Score: 1

    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.