Converting Binary Floating‐Point Numbers to Shortest Decimal Strings: An Experimental Review.

Saved in:
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
FullText Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 192157646
AccessLevel: 6
PubType: Academic Journal
PubTypeId: academicJournal
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: Converting Binary Floating‐Point Numbers to Shortest Decimal Strings: An Experimental Review.
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22Champagne+Gareau%2C+Jaël%22">Champagne Gareau, Jaël</searchLink><relatesTo>1</relatesTo> (AUTHOR)<br /><searchLink fieldCode="AR" term="%22Lemire%2C+Daniel%22">Lemire, Daniel</searchLink><relatesTo>1</relatesTo> (AUTHOR)<i> daniel.lemire@teluq.ca</i>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Software%3A+Practice+%26+Experience%22">Software: Practice & Experience</searchLink>. Apr2026, Vol. 56 Issue 4, p462-478. 17p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22Data+conversion%22">Data conversion</searchLink><br /><searchLink fieldCode="DE" term="%22Decimal+system%22">Decimal system</searchLink><br /><searchLink fieldCode="DE" term="%22Benchmark+problems+%28Computer+science%29%22">Benchmark problems (Computer science)</searchLink><br /><searchLink fieldCode="DE" term="%22Mathematical+optimization%22">Mathematical optimization</searchLink><br /><searchLink fieldCode="DE" term="%22High+performance+processors%22">High performance processors</searchLink><br /><searchLink fieldCode="DE" term="%22Electronic+data+processing%22">Electronic data processing</searchLink><br /><searchLink fieldCode="DE" term="%22Steele%2C+Christopher%2C+1964-%22">Steele, Christopher, 1964-</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: 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]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>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.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=192157646
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1002/spe.70056
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 17
        StartPage: 462
    Subjects:
      – SubjectFull: Data conversion
        Type: general
      – SubjectFull: Decimal system
        Type: general
      – SubjectFull: Benchmark problems (Computer science)
        Type: general
      – SubjectFull: Mathematical optimization
        Type: general
      – SubjectFull: High performance processors
        Type: general
      – SubjectFull: Electronic data processing
        Type: general
      – SubjectFull: Steele, Christopher, 1964-
        Type: general
    Titles:
      – TitleFull: Converting Binary Floating‐Point Numbers to Shortest Decimal Strings: An Experimental Review.
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: Champagne Gareau, Jaël
      – PersonEntity:
          Name:
            NameFull: Lemire, Daniel
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 04
              Text: Apr2026
              Type: published
              Y: 2026
          Identifiers:
            – Type: issn-print
              Value: 00380644
          Numbering:
            – Type: volume
              Value: 56
            – Type: issue
              Value: 4
          Titles:
            – TitleFull: Software: Practice & Experience
              Type: main
ResultId 1