# Double-double: 31 digits of precision without leaving the FPU

> Hacker News story 49322868 · language: en · submitted 2026-08-16
> Web version: https://zeli.app/story/49322868
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 42 · by [iliketrains](<https://news.ycombinator.com/user?id=iliketrains>) · 💬 11
[original](<https://marekfiser.com/blog/double-double-arithmetic/>) · [HN discussion](<https://news.ycombinator.com/item?id=49322868>)

## Summary

A double-double pairs two doubles to yield ~31 decimal digits at roughly 9x the cost of a plain double, filling the gap between double and arbitrary-precision libraries. The post explains error-free transformations (two-sum, quick two-sum, two-product) and benchmarks against MPFR, showing double-double is about 9x faster than MPFR at matched precision.

## Key quote

> Keep two doubles separate, but treat them as one number.

## HN discussion (11 comments)

### [ncruces](<https://news.ycombinator.com/item?id=49377744>)

> I have a Go library implementing double-double arithmetic (and also exponentials, logarithms, trigonometry...): https://github.com/ncruces/dbldbl
>
> Mostly useless, but was quite fun to write.

### [tobias2014](<https://news.ycombinator.com/item?id=49376379>)

> AI has rediscovered https://www.davidhbailey.com/dhbsoftware/ and similar? Or are there algorithmic improvements? Without referencing established double-double work it's hard to know.

### [aappleby](<https://news.ycombinator.com/item?id=49376403>)

> Fun fact - Google Maps does something similar to this in WebGL in order to keep accurate coordinates across a planet-sized map using only 32-bit floats.

---

## Cite

- Page: https://zeli.app/story/49322868
- Date: 2026-08-16
- Source: marekfiser.com (https://marekfiser.com/blog/double-double-arithmetic/)
- Hacker News: https://news.ycombinator.com/item?id=49322868

## Other languages

- zh: https://zeli.app/zh/story/49322868 · markdown: https://zeli.app/zh/story/49322868.md
- ja: https://zeli.app/ja/story/49322868 · markdown: https://zeli.app/ja/story/49322868.md
- ko: https://zeli.app/ko/story/49322868 · markdown: https://zeli.app/ko/story/49322868.md
- de: https://zeli.app/de/story/49322868 · markdown: https://zeli.app/de/story/49322868.md
- es: https://zeli.app/es/story/49322868 · markdown: https://zeli.app/es/story/49322868.md
