English

Fast Number Parsing Without Fallback

Data Structures and Algorithms 2023-06-06 v2

Abstract

In recent work, Lemire (2021) presented a fast algorithm to convert number strings into binary floating-point numbers. The algorithm has been adopted by several important systems: e.g., it is part of the runtime libraries of GCC 12, Rust 1.55, and Go 1.16. The algorithm parses any number string with a significand containing no more than 19 digits into an IEEE floating-point number. However, there is a check leading to a fallback function to ensure correctness. This fallback function is never called in practice. We prove that the fallback is unnecessary. Thus we can slightly simplify the algorithm and its implementation.

Keywords

Cite

@article{arxiv.2212.06644,
  title  = {Fast Number Parsing Without Fallback},
  author = {Noble Mushtak and Daniel Lemire},
  journal= {arXiv preprint arXiv:2212.06644},
  year   = {2023}
}
R2 v1 2026-06-28T07:32:28.593Z