Bibliographic Details
| Title: |
Converting Binary Floating‐Point Numbers to Shortest Decimal Strings: An Experimental Review. |
| Authors: |
Champagne Gareau, Jaël1 (AUTHOR), Lemire, Daniel1 (AUTHOR) daniel.lemire@teluq.ca |
| Source: |
Software: Practice & Experience. Apr2026, Vol. 56 Issue 4, p462-478. 17p. |
| Subjects: |
Data conversion, Decimal system, Benchmark problems (Computer science), Mathematical optimization, High performance processors, Electronic data processing, Steele, Christopher, 1964- |
| Abstract: |
Background: When sharing or logging numerical data, we must convert binary floating‐point numbers into their decimal string representations. For example, the number π might become 3.1415927. Engineers have perfected many algorithms for producing such accurate, short strings. Aims: We present an empirical comparison across diverse hardware architectures and datasets. Methods: We benchmarked several established and recent algorithms for converting binary floating‐point numbers (IEEE 754 double‐precision) to their decimal string representations. We executed the conversions across multiple CPU microarchitectures, including recent Intel (Alder Lake, Skylake), AMD (Zen 3, Zen 4), and ARM (Apple M1/M2, Neoverse) processors, using recent versions of GCC, Clang, and platform‐specific compilers and several datasets. Results and Conclusions: Cutting‐edge techniques like Schubfach and Dragonbox achieve up to a tenfold speedup over Steele and White's Dragon4, executing as few as 210 instructions per conversion compared to Dragon4's 1500–5000 instructions. Often per their specification, none of the implementations we surveyed consistently produced the shortest possible strings—some generate outputs up to 30% longer than optimal. We find that standard library implementations in languages such as C++ and Swift execute significantly more instructions than the fastest methods, with performance gaps varying across CPU architectures and compilers. We suggest some optimization targets for future research. [ABSTRACT FROM AUTHOR] |
|
Copyright of Software: Practice & Experience is the property of Wiley-Blackwell and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) |
| Database: |
Engineering Source |