惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
Simon Willison's Weblog
Simon Willison's Weblog
H
Help Net Security
F
Fortinet All Blogs
H
Heimdal Security Blog
S
Schneier on Security
L
LangChain Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
NISL@THU
NISL@THU
P
Palo Alto Networks Blog
J
Java Code Geeks
博客园 - 【当耐特】
The Last Watchdog
The Last Watchdog
W
WeLiveSecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
I
InfoQ
Recorded Future
Recorded Future
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
CERT Recently Published Vulnerability Notes
T
Tenable Blog
腾讯CDC
C
Check Point Blog
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
罗磊的独立博客
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
小众软件
小众软件
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
CXSECURITY Database RSS Feed - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
V2EX - 技术
V2EX - 技术
T
Threatpost
Engineering at Meta
Engineering at Meta
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
S
Securelist
The Cloudflare Blog
博客园 - 叶小钗
L
LINUX DO - 最新话题
T
Troy Hunt's Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
爱范儿
爱范儿

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Introducing Database Traffic Control — PlanetScale Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
A calculator that doesn’t round
2026-06-13 · via Hacker News
← Constructive Calculator

No Rounding

June 11, 2026

Constructive Calculator is an iPhone calculator that doesn’t round at all. It computes with constructive real numbers: every result is exact, and you can scroll any answer for as many correct digits as you want. What that gives you:

  • exp(π√163), Ramanujan’s constant, looks like the integer 262,537,412,640,768,744. Scroll past the decimal point and you find twelve 9s before it finally diverges.
  • exp(100) + 42 − exp(100) returns exactly 42. In IEEE 754 double, exp(100) ≈ 2.7×1043, and adding 42 changes nothing (42 falls off the bottom of the representation), so the subtraction gives 0. The constructive engine evaluates exp(100) to as many digits as is needed, twice, and the subtraction leaves only 42. The calculator does not simplify the expression first; it does indeed perform both operations as instructed: addition and then subtraction.

It’s made possible by constructive (or computable) real arithmetic: instead of storing a number as a fixed-width approximation, store a function that produces an approximation to any requested precision, and evaluate each subexpression to whatever precision the final answer needs. Hans Boehm built a Java library for this in the 1980s and 90s, and it has been the engine behind Android’s built-in Calculator, a fact that periodically delights Hacker News.

But there was no equivalent on iPhone that I could find, so I built one, by porting Boehm’s engine.

It’s 2026, so I didn’t hand-write the port. I directed Opus 4.8 to translate the source line by line into Swift, and steered the process (architecture, UI, on-device testing, the App Store machinery) over a long back-and-forth.

What got ported:

  • com.hp.creals, Boehm’s constructive-reals library (CR, the transcendental functions, the Gauss-Legendre AGM for π), into a Swift package.
  • UnifiedReal / BoundedRational from AOSP’s ExactCalculator, the layer that keeps results symbolically exact when it can (so cos(π/3) comes back as exactly ½, not a constructive approximation of it) and makes comparisons decidable for the rational cases.
  • The expression evaluator and a SwiftUI front end with the scroll-for-more-digits display.

The interesting work was what didn’t translate directly. Java’s synchronized, checked exceptions, and AsyncTask have no Swift equivalents, so the port re-expressed them: exceptions became Swift throws, precision-overflow and divergence became typed errors, and Java’s interrupt-based cancellation became Swift Concurrency’s Task.checkCancellation(). The 2013 Mac I develop on can’t run a current Xcode, so signing and TestFlight uploads run on GitHub Actions; the local machine never touches the submission.

Then I had a different model, Fable 5, do a clean-room review: fresh context, no memory of how the code was built, just the repository. It earned its keep:

  • A concurrency bug: @MainActor was attached to the wrong type, so the view model wasn’t main-actor isolated and a background task was mutating @Published state off the main thread.
  • A subtler one: Boehm’s Java get_appr (the memoized approximation routine) is synchronized; the port had dropped the lock and leaned on an actor to serialize access, but two paths slipped around the actor, so two threads could race the same constructive real’s cache. For shared singletons like π that is a memory-safety bug, not just a wrong digit. The fix was the faithful one: put the lock back (reentrant, since the square-root routine re-enters itself).
  • A main-thread freeze: a large factorial was evaluated synchronously, hanging the UI with no way to cancel. It now runs off the main thread, cancellable, with a sane cap.
  • And the boring-but-mandatory App Store gaps: a missing privacy manifest, the export-compliance flag, accessibility labels.

As a data point on AI-assisted development, I found this quite useful: the port itself was faithful (Fable 5 checked the algorithms against Boehm’s Java and found no transcription errors), but the adaptation to a different concurrency model is where the bugs lived, and a second model with no stake in the first one’s choices caught them. None would have shown up in the unit tests.

Known Limitations

Exact real arithmetic has a hard wall: equality is undecidable. You cannot, in general, prove two constructive reals are equal by any finite computation. So exp(100)+42−exp(100) is correctly 42, but the app can’t prove it terminates; it prints 42.000… with a “more digits” arrow and will emit zeros forever. It always gives you the right number to as many digits as you want; it only labels a result “exact” when the value stays inside the structured rational-times-known-constant form. cos(π/3)=½ does; exp(100)+42 doesn’t. Android’s calculator has the same property, for the same reason.

Try it

Early TestFlight beta, iPhone, iOS 16+: join here. Caveat: iPhone-only for now. Feedback very welcome, especially edge cases: support@dimview.org.

Update, June 15, 2026: added the standard normal CDF and its inverse, pnorm and qnorm (Φ and Φ−1 on the keypad), computed to arbitrary precision. This one needed new math. The error function isn’t in Boehm’s library, so it’s the first function here that isn’t a port: it’s implemented directly, as a cancellation-free constructive series. Now in the TestFlight beta.