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.
翻译:在最近的工作中,莱米尔(2021年)提出了一个快速算法,将数字字符串转换成二进制浮动点数字。该算法已被几个重要系统采用:例如,它是海湾合作委员会12、Rust 1.55和Go 1.16运行时图书馆的一部分。该算法将任何数字字符串用符号和不超过19位数的字符串划入IEEE浮动点编号。然而,有一个检查导致一个后退功能,以确保正确性。这个后退功能在实践中从未被调用。我们证明,后退是不必要的。因此我们可以略微简化算法及其实施。</s>