Metraipolis › archive › dc_cf531991926c
When Double Rounding is Correct — arXiv:2610.09005
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2610.09005
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-08T12:50:04.572Z
- SHA-256 of the archived text
ba199a924b88339093febc08f15623170beb2a24420daf096cfc1dcdec86aac6- Stable URL of this page
https://metraipolis.com/documento/dc_cf531991926c
How to cite
When Double Rounding is Correct — arXiv:2610.09005 — arXiv (en), https://arxiv.org/abs/2610.09005 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_cf531991926c (Metraipolis archive dc_cf531991926c, sha256 ba199a924b88339093febc08f15623170beb2a24420daf096cfc1dcdec86aac6)
BibTeX
@misc{dccf531991926c,
title = {When Double Rounding is Correct — arXiv:2610.09005},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2610.09005},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_cf531991926c; sha256 ba199a924b88339093febc08f15623170beb2a24420daf096cfc1dcdec86aac6},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.09005. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Number libraries, which implement number formats and their arithmetic in software, are used to simulate hardware, making hardware behavior reproducible and thus verifiable and easier to design. However, modern machine learning accelerators are difficult to simulate, as they increasingly use specialized number formats that existing number libraries do not support. It is costly to extend these libraries using traditional methods: each combination of operation, format, and rounding mode typically requires a bespoke implementation. An easier way is to double round---compute at higher precision, then re-round---so that one high-precision kernel serves many formats, but double rounding is only known to be correct in select cases. We give a precise, efficiently checkable characterization of when double rounding is correct across many formats and rounding modes. Our result rests on a novel abstract number format that unifies fixed- and floating-point representations, reducing the correctness of double rounding to format containment: whether every value of one format is representable in another. We mechanized these results in Lean 4. In addition, we introduce a format inference algorithm that, given a sequence of operations, bounds each expression by a number format guaranteed to contain its result. We apply these insights in two ways. First, we present MPFX, a correctly-rounded, multi-precision number library that exploits correct double rounding to efficiently simulate many number formats. MPFX's correctly-rounded operations are up to 11x (mean: 6.05x) faster than MPFR's, and competitive with SoftFloat's---between 0.46x and 1.63x as fast (mean: 0.94x)---at the same precision. Second, in a case study, we implement a software simulation of a hardware specification using both SoftFloat and MPFX's primitives; the MPFX version is up to 13.5x faster. Tema degli esploratori: calcolo e infrastrutture (elenco arXiv cs.PL, nuovi lavori del giorno). Categorie arXiv: Programming Languages (cs.PL). Pagina del lavoro: https://arxiv.org/abs/2610.09005 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-08T12:20:30.487Z dalla pagina https://arxiv.org/list/cs.PL/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).