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

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

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.

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

    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.

  2. tobias2014

    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.

  3. aappleby

    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.

More from this day

2026-08-20