Live data from Hacker News

A calculator that doesn't round

constructive-calculator.dimview.org

1–10 of 28 posts

Re: A calculator that doesn't round

#2
Author here. I could not find a constructive‑reals calculator on iPhone, so I ported the engine Android uses: Hans Boehm's com.hp.creals plus AOSP's UnifiedReal/BoundedRational. Used Opus 4.8 to do the port and Fable 5 for the review.

Fable 5 caught a couple of real concurrency bugs the port introduced while adapting Java's synchronized/AsyncTask to Swift concurrency, including one that was a memory‑safety bug on shared singletons like π, not just a wrong digit. None would have shown up in the unit tests. Writeup has the details.

It's an early iPhone TestFlight beta (link in the post); happy to go deep on either the constructive‑reals side or the AI‑assisted‑dev side.

Re: A calculator that doesn't round

#8
post #2

Author here. I could not find a constructive‑reals calculator on iPhone, so I ported the engine Android uses: Hans Boehm's com.hp.creals plus AOSP's UnifiedReal/BoundedRational. Used Opus 4.8 to do the port and Fable 5 for the review. Fable 5 caught a couple of real concurrency bugs the port introduced while adapting Java's synchronized/AsyncTask to Swift concurrency, including one that was a memory‑safety bug on sha…

The old HP calculators, and their emulators, have a computer algebra system, for symbolic maths, that supported this. The user interfaces leave much to be desired, but some also have reverse Polish notation!

Re: A calculator that doesn't round

#10
post #7

> Hans Boehm built a Java library for this in the 1980s and 90s Hans is such a prolific programmer that he wrote a Java library before Java was even invented?

The article has so many of the hallmarks of LLM writing, naturally it will have some hallucinated factoids too. "What that gives you: [bullet list]", "What got ported: [bullet list]", "foo: x, y, just z"

Boehm's Java library has copyright dates of 1999 and 2001-2004. https://www.hboehm.info/new_crcalc/CR.java

The whitepaper was only published in 2005: https://www.sciencedirect.com/science/article/pii/S156783260...

I have a dimview now of the blog, and of this Swift port of the library, indeed.

Post reply on HN