August 31st, 2024

Is my vision that bad? No, it's just a bug in Apple's Calculator

Martin Wojtczyk discovered a bug in Apple’s Calculator causing misaligned binary digits, likely due to prolonged use and rounding errors, and expressed frustration over the lack of a feedback option.

Read original articleLink Icon
Is my vision that bad? No, it's just a bug in Apple's Calculator

While using Apple’s Calculator for programming tasks, Martin Wojtczyk noticed an unusual visual issue where some digits in the binary display appeared misaligned by one pixel. Initially attributing the problem to eye strain, he later confirmed it was a bug in the application. The misalignment seemed to be a result of the calculator being open for an extended period, potentially due to a rounding error in the UI coordinate system. Wojtczyk expressed frustration over the lack of a feedback option to report the bug to Apple, opting instead to share his findings online. He concluded that his vision was not the issue, but rather a glitch in the software.

- A bug in Apple’s Calculator causes misalignment of digits in the binary display.

- The issue may stem from prolonged use and potential rounding errors in the UI.

- Wojtczyk initially thought the problem was due to eye strain.

- There is no feedback option available to report the bug to Apple.

- The author shared the bug online instead of contacting Apple directly.

Link Icon 54 comments
By @DavidPiper - 8 months
Comically, I didn't even notice those wobbly numbers in the first screenshot, I was too busy noticing:

- "Unicode" button label way off center

- The 8/10/16 selector being off center in its own position

- The indicators for bits 31 and 63 are not aligned with each other

- x and + not being horizontally aligned (I believe this is an icon-font issue, seen on HN before so knew to look for it)

By @rgovostes - 8 months
A friend doing homework for a university assignment, circa Leopard or Snow Leopard, noticed that Calculator produced negative values when raising a negative number to an even power.

The bug turned out to be in CFNumber, in Core Foundation. CFNumber does a lot of fiddly stuff at the bit level for performance, and one of their optimizations for exponentiation was incorrect. Somehow it was never found by tests or due to buggy behaviors it created in other apps, but by someone clicking buttons and thinking critically about the output.

By @yayitswei - 8 months
Reminded me of this article about how centering things is the hardest problem in computer science (with plenty of examples).

https://tonsky.me/blog/centering/

By @dylan-m - 8 months
One of my favourite unreported MacOS issues comes from how, at some point, they changed the appearance of the window close button to be a particular shade of red with a tiny little X in the center. And if you happen to be using a particular kind of screen and possibly wearing glasses, that little X kind of wanders around in the button, appearing just slightly off center in a maddening way. Made only more maddening by the glasses component: https://www.robbert.org/2014/10/the-off-center-close-button/.

That post points out it’s probably just subpixel stuff causing the issue, but I think my thick, cheap glasses at the time were adding a layer of chromatic aberration to something that was already visually confusing.

I assume it’s kind of gone away at this point with all the high DPI screens these days. But I remember thinking at the time, if there was a public bug tracker, that issue would be a fun one.

By @jb1991 - 8 months
On mobile devices, Apple’s Calculator app has always been one of the most frustrating apps I’ve ever used, and I’m surprised it’s a stock app by the company itself. If you press buttons quickly, like you would a normal calculator, many of the key presses simply don’t register at all. I’m not sure if they’re prioritizing some pretty little visual animation over actual functionality, but it’s incredibly surprising from a company that focuses on user interaction, supposedly.
By @djbusby - 8 months
Maybe now is a good time to remind everyone: your vision will deteriorate. Keep this in mind when designing.

When I first came to HN it wasn't an issue. Now I have to use my own app for it so the font (and some other things) are workable.

According to my eye doctor the screen time is causing eyesight issues earlier. We're not designed to stare at a bright light 40cm away all day.

May want to look at some eye exercises - or at least something far away.

By @tanelpoder - 8 months
Haha, off-by-one pixel error!

I still see MacOS as the best choice for my desktop/laptop uses (browser and SSH), but I also have a documents folder that I’ve accumulated over decades. I still use various .txt files in the docs folder as my low tech note taking apps.

I use the Spotlight or Alfred keyboard shortcuts (that also use spotlight index?) for quickly opening the files when needed - and annoyingly my most important file - notes.txt - regularly disappears from the Spotlight index and suggestions. It’s been like that for at least 5 years, probably closer to 10. I’m not even trying anymore, will just open the file from command line with vi as the fallback step.

By @hakanderyal - 8 months
My bet would be on some compounding error from long usage also.

I'm using Apple Notes and it fails in some random ways after keeping it open for 1-2 weeks: When I try to copy something I select, it copies some random stuff, dragging text won't work, I can check/uncheck todo boxes. Goes away when I restart it.

By @msephton - 8 months
My initial thoughts were that these issues were showing how things look on a non-retina display, or a display with non-default scaling. That does seem to be the case, but not entirely.

I took some screenshots and I do not see the misaligned numbers at retina or non-retina resolutions, but I do see the odd bevelled edges on the 8/10/16 "tabs": https://imgur.com/a/PqqkWai

Apple have pretty much given up on making things look correct on non-retina displays, so many things are positioned at what turn out to be half pixel steps. Depending on whether we're talking fonts or shapes things can jump by a pixel or become blurry. I wrote about this here: https://blog.gingerbeardman.com/2024/01/25/running-modern-ma...

By @ChrisMarshallNY - 8 months
> I would contact Apple, if there was a feedback option, but there isn’t

There is: https://feedbackassistant.apple.com/

That said, it isn’t very user-friendly, and I find that they don’t seem to pay much attention to it. When they do respond, it tends to be some form of “#wontfix. Please close this.”

That looks like a fairly ugly little bug. I suspect they know about it now, thanks to the HN Bug Reporter. It tends to highlight these types of things.

By @andrewinardeer - 8 months
Windows 11 lets you conveniently "pin" the calculator in standard mode, keeping it accessible on top of your active window – great for multitasking with calculations.

However, switch to a different calculator mode (like scientific), and Windows inexplicably removes the pinning feature.

This baffling decision feels so actively user hostile it is deserving of an award for poor design choices.

By @ntrcessor - 8 months
If I recall correctly, that is a kerning issue with the font. At the edges of the font is not a solid line, but rather more like every other pixel so that the characters can be closer together. This causes the up/down movement of one character to the next, as they fit together like poorly made puzzle pieces. And just how bad it looks depends on the size of the pixel on the monitor, and how much "bleed" it has with it's neighbors. (I don't recall the tech terms for this.)
By @galad87 - 8 months
macOS on a low dpi screen is mostly full of those kind of issues. I wouldn't recommend using a low dpi screen.
By @fferen - 8 months
On the topic of calculator font bugs, Google's calculator randomly switches between two fonts:

https://pasteboard.co/lmbr4iE6BJej.png

https://pasteboard.co/sU3GA5psIaT0.png

By @kibwen - 8 months
How would you even tell in the first place? The contrast on those digits is so low and their font weight is so light as to render them essentially invisible.

And as far as bad design goes, why are the bit position indicators on the right (0, 32) center-justified underneath their digits, whereas the ones on the left (31, 63) are left-justified?

By @wslh - 8 months
Beyond this bug, nowadays accessibility features are one of the most used in my setup, and I think as software engineers age they will become more sophisticated.

I remember using fonts of 8pt in an IDE to "squeeze " the potential of the monitor.

By @quink - 8 months
Starting to see this with view counts on YouTube in Firefox after some recent UI updates.
By @heywoods - 8 months
This post is going to lead to a new calculator and a calculator app on the iPad.
By @rustybolt - 8 months
> I would contact Apple, if there was a feedback option, but there isn’t

This is infuriating and the same for all the big companies (at least Google, Microsoft, Apple); you have a serious issue and simply no way to talk to a representative. The best you can do is post something on Hacker News and hope it somehow gets picked up.

I worked at a company that paid Microsoft a lot to have a 1-day SLA for support. When I contacted them, I got a reply back weeks later saying "hey sorry I missed your email". About two weeks later (which was the time it took to email back and forth), it was clear that I had to insert another ticket and mark the subject as something else (that was not directly related, but apparently the team responsible for that subject was also working on the functionality I found a bug in. There was no way for me to know this since it was something internal to Microsoft). So, I had to go through the whole procedure again.

Once I did that, the reply was "oh yeah, we dropped that functionality but the documentation doesn't mention it. we recommend you use <technology X> for this". Where, of course, technology X did not support the feature I was trying to use.

By @rgovostes - 8 months
I can usually appreciate Apple's design homages. The original iOS Calculator is inspired by the Braun ET, and it makes some sense to provide a familiar design for basic use.

But it inherits baggage from the limitations of the handheld calculators of the 1970s. Why can't I use the - button to write a negative sign? What does "AC" mean? The scientific calculator is an even worse design. There's a ton of invisible state, like the value stored in memory, or whether you're inside parentheses. The user has to hold the whole sequence of operations in their head, without clicking a single wrong button. Want to repeat a calculation with a different operand? Tough.

Graphing calculators like the TI-84 that let you see and edit your input are so much more usable. Even better are notebook-style interfaces like Mathematica. It's a shame Apple won't pay homage to those designs.

By @jacobp100 - 8 months
If I may pitch my own app, TechniCalc has this same mode, along with a bunch of other stuff the built in app doesn’t support. It works on iOS, iPadOS, and macOS

https://jacobdoescode.com/technicalc

By @Aerbil313 - 8 months
Once I had downloaded a HN thread for later reading, on my iPhone with Safari's built-in Download Linked File feature. When I opened it and was reading it (HN renders fine with just the HTML), I noticed a single line looking a bit off. Took my glasses off to take a closer look. I don't remember the specifics, but I think the spacing with the line above was slightly less than usual. Took screenshots and it was clearly visible zoomed in. Happened twice that day and never before, never after. I believe I witnessed a cosmic ray induced bit flip.
By @klausa - 8 months
>Maybe the UI coordinate system is using floats and a rounding error aggregated over many days

It's using floats on 32bit (...which means only the watchOS currently, I guess?) and doubles elsewhere.

Are there any modern UI frameworks that _don't_ use floats/doubles?

I was gonna guess CSS, but even that has supported sub-pixel precisions on HiDPI displays for a while now.

[1]: https://stackoverflow.com/questions/5709698/html-sub-pixel-b...

By @lapcat - 8 months
Apple software quality has gone into the trash the past 10 years. I'm not talking about initial quality but rather about "mature" quality, i.e., the current public versions almost a full year after a major release.

I was just talking about this yesterday: somehow TextEdit on Mac has been wrecked. TextEdit, which is essentially a wrapper around NSTextView, was more or less "perfect" 15-20 years ago. Now I experience a bug where the window is blank when I open a document until I click inside a window, and scrolling performance in a long document is atrocious. For example, if I try to scroll backward, from the end of the document, it stutters and can lose my place. This doesn't depend on the document; it happens all the time.

I guess that Apple rewrote everything a few years ago with TextKit 2, and it shows, but not in a good way.

The impression I get from Apple is that Craig Federighi has given engineers license to keep churning out new features and not worry much about bugs, or design, or the user interface. And if something becomes a massive problem, they just pause on features for a couple of weeks, which is like rearranging the deck chairs on the Titanic.

By @spacecadet - 8 months
Casio FX115ES Plus, its only $15. Looks great, feels great, just works.
By @amai - 8 months
Relevant remark in the comment section of the blog post:

"after I took screenshots and restarted the calculator, the misplacements were gone. I am looking out for it to happen again."

By @OldGuyInTheClub - 8 months
I like Apple's hardware and underlying OS enough to shell out for MacBook Pros but, man, their homebuilt applications are a PITA. The RPN calculator on my high powered new MBP doesn't have a scientific or engineering notation option.

Same on my old MBP as well.

I guess it is a feature.

https://discussions.apple.com/thread/3527779?sortBy=rank

By @usaphp - 8 months
Reminds me of Microsoft calculator having a one pixel off between buttons: https://www.reddit.com/r/mildlyinfuriating/comments/a5r971/t...
By @superjan - 8 months
Possibly they ask the text engine to render halfway two pixel lines. It will round up or down quite randomly when fp errors accumulate.
By @Bondi_Blue - 8 months
You can try submitting a bug report with Feedback Assistant.app or apple.com/feedback, but there’s no guarantee they will see it.
By @trissylegs - 8 months
There's a similar bug in the Windows calculator. One of the buttons is about 1 pixel wider than the rest.
By @throwpoaster - 8 months
Aren't the raised digits an indication of endianness or something? It looks like a transmission bit pattern. Or isn't high low high low double high double low the original Apple disk format? It's something like that.

Just guessing -- it doesn't look accidental to me.

By @DrNosferatu - 8 months
I would say it's a feature: it's supposed to be like a mechanical odometer.
By @steve1977 - 8 months
Proudly presented to you by the company that took 14 years to port the calculator to the iPad, because “if we do it, it has to be the greatest calculator app“
By @megablast - 8 months
One that Apple seems to ignore. You click on something. And the micro second before it changes the hi, causing you to click something else.
By @manoweb - 8 months
I’m pretty sure there are Apple employees that read HN. It would have been cool to include a build number of the OS
By @tlhunter - 8 months
Here's something that really irks me. On macOS I'll use Spotlight (Cmd+Space) to do some quick math. For example, press Cmd+Space, type "1.2+3.4", and it sort of displays 4.6. Now to copy the results you either have to click the copy option in the dropdown, using your mouse (no thanks), or press enter to get the results in Calculator.

Assuming you last left the calculator in "Programmer" mode the calculator displays the value "4".

Ideally, pressing enter in Spotlight would simply replace the text in the input bar with the result. The equivalent Alt+Space tool in KDE (Plasma Search) performs math this way and it's amazing. I haven't used Quicksilver or Alfred in a decade but I'm sure they do the right thing, too.

Otherwise both Spotlight and Plasma Search are both pretty great. Type something like "14oz to lb" and they both display the result (though Plasma Search displays the exact "0.875 pounds" while Spotlight displays the rounded "0.88 pounds").

Overall I'm mostly disappointed with first-party Apple software. Being one of the richest companies in the world I have higher expectations.

By @sigio - 8 months
This is to fit in with the windows calculator, which also has off-by-one pixel errors: https://www.reddit.com/r/mildlyinfuriating/comments/a5r971/t...
By @virtualritz - 8 months
And this on a Mac. :D

That would have never happened under Jobs's watch.

By @Modified3019 - 8 months
They clearly need better telemetry in the calculator app.
By @userbinator - 8 months
My bet is on a random bitflip more than an actual bug in the code, based on its localised nature and rarity.

Antialiased text always looks blurry to me after looking at pixel fonts all the time.

By @shmeeed - 8 months
This would never have gone past Jobs.
By @mgaunard - 8 months
In that picture I'm personally more bothered by the antialiasing than by the misalignment.
By @imchillyb - 8 months
I’ve been using an app called PCalc on Apple’s App Store.

The Apple calculator is a frustrating mess to use.

PCalc does scientific, engineering, and A to B calculations for most things.

I wouldn’t go back to Apple’s calculator app even if Apple gave me a credit for the PCalc app.

Nope.

By @raws - 8 months
YouTube viewership numbers ha et a similar issue.
By @ABCD0 - 8 months
Juste my vision
By @theGeatZhopa - 8 months
It's font hinting and kerning. But whyyy the heck only in the last few chars?
By @hollerith - 8 months
Maybe the bug is the need for everything to line up perfectly.