Remix.run Logo
Bravo Apple! Calculator app has a memory leak(xcancel.com)
78 points by pfexec 2 days ago | 35 comments
rgovostes a day ago | parent | next [-]

Many years ago, ~2009ish, a friend pointed out that Calculator.app was giving the wrong sign when raising a positive number to a negative exponent. It turned out to be a bug in CFNumber affecting virtually every app.

I noticed the other day that you can type "1+1 sq ft in sq in=" and macOS will helpfully autocomplete the answer: 1,694.0031 square inches. Which is completely wrong. 2 square feet is 288 square inches. It took a few minutes to solve the puzzle of what the hell it is doing.

So take caution trusting Apple's math, which naturally is up to 2x better³—for some value of x.

OptionOfT a day ago | parent | next [-]

Thank you for posting this.

I had the same issue with a different calculation. The answer was wrong.

I thought it looks weird because I put a space after the = and the autocomplete does not add that.

jb1991 a day ago | parent | prev | next [-]

"1+1 sq ft in sq in="

The order of operations here is quite ambiguous. It’s not obvious even to a human reader how you would expect this to be interpreted.

rgovostes 18 hours ago | parent | next [-]

There is a perfectly cromulent grammar for a unit-aware calculator:

    <expression without units> [<unit> [in <unit>]]
    <expression with units> [in <unit>]
"1+2 feet in meters" and "1 foot + 1 meter" are both unambiguous. There is no order of operations in terms of how the units bind. The expression "1 foot + 1" is appropriately invalid.

Of course the appropriate care must be paid to interpreting "in" correctly as either a unit or a keyword.

mulmen a day ago | parent | prev [-]

I honestly can't tell what this would mean other than 2 square feet in inches. What's the other option?

fzzzy a day ago | parent | next [-]

(1 sq ft in sq in) + 1?

fluidcruft a day ago | parent | prev [-]

Another option could be that it's ill-posed and should just return an error.

handsclean a day ago | parent | prev | next [-]

> 1+1 sq ft in sq in=

Fun puzzle. Spoilers ahead:

It seems it’s considering the first 1, and not the second, to be in square meters. “(1+1) sq ft in sq in” works.

puce a day ago | parent [-]

1+1 sq ft = 11.76 feet^2

a day ago | parent | prev [-]
[deleted]
ycui1986 a day ago | parent | prev | next [-]

The apple’s calculator is so bad, I cannot believe it that tech website used praise this.

If you type too quick, it misses numbers.

If you type too many times “+” it add too many times

If you try to use it as old standalone calculator, things does not calculate right.

It is hard to clear numbers.

Just so stupid.

smallstepforman a day ago | parent [-]

Its been missing touch input for over 6 years now, still cannot believe their dev teams do not have professional pride to fix such an embaressing flaw.

TZubiri a day ago | parent [-]

Jobs is dead

LeoPanthera a day ago | parent | prev | next [-]

I have fond memories of the Windows 3.1 calculator being unable to calculate 2.01 - 2. (It gives the answer 0.00)

supernes a day ago | parent | prev | next [-]

Apple can save some memory by rewriting it as an Electron app.

lukeinator42 a day ago | parent | prev | next [-]

I don't know if xcancel is getting hugged to death or blocks all of Canada or something, but I've been getting connection refused every time I've clicked on one of their links here.

Marsymars a day ago | parent [-]

Works in Canada here, but it’s probably just getting rate-limited by Twitter; I’m surprised any Nitter instance works at this point.

pjmlp a day ago | parent | prev | next [-]

That is a lot of calculations, how can a plain calculator leak so much memory to reach 32 GB?

abnercoimbre a day ago | parent | prev | next [-]

Can we just say thank you for the xcancel link? I hope HN continues that trend for those of us without Twitter/X accounts.

dzhiurgis a day ago | parent | prev | next [-]

[flagged]

Alifatisk a day ago | parent | next [-]

No it should not, using that site without a Twitter account is horrible

NaomiLehman a day ago | parent | prev | next [-]

Hi, Elon!

bigyabai a day ago | parent | prev [-]

X doesn't have a usable interface for the casual click-through audience that HN caters to. The static content is deliberately (and pointlessly) stripped to prioritize bilking X engagement over the user's engagement.

In aggregate, people will choose to submit the option that abuses users less. Xcancel keeps the original X link unobstructed if you need it for some reason.

mulmen a day ago | parent | prev | next [-]

[flagged]

throwaway984393 a day ago | parent [-]

[dead]

NaOH a day ago | parent | prev [-]

>Please submit the original source.

https://news.ycombinator.com/newsguidelines.html

https://x.com/neogoose_btw/status/1968757466570621251

thomassmith65 a day ago | parent | next [-]

In 2025, it's a better user experience to link to a mirror. Whether it's ethical is a different matter. Half the articles posted to HN would go unread if someone didn't post a mirrored version in the comments.

ajdude a day ago | parent | prev | next [-]

As soon as I try clicking that page, I got several pop-ups trying to take me to the App Store. When I finally managed to dismiss it, I just got a full screen pop-up asking me to sign in. I can't even view the link you posted on my phone. I wish there was a better way.

magnio a day ago | parent | prev | next [-]

Can we get an exception to this? Twitter does not show replies (and many times, the tweet itself) if I am not logged in.

mayneack a day ago | parent | prev [-]

This is to avoid blogspam not paywalls.

gnabgib 15 hours ago | parent | next [-]

No it's just a user avoiding dupe detection: https://news.ycombinator.com/item?id=45294836

dzhiurgis a day ago | parent | prev [-]

And is xcancel is charity?

mayneack a day ago | parent | next [-]

It's open source software that runs on donations, so... yeah? https://xcancel.com/about

serpenskisidiot an hour ago | parent [-]

would take it over the amp links they are doing nowadays

NaomiLehman a day ago | parent | prev [-]

more than Twitter