r/programming • u/mttd • Aug 12 '26
The fastest double-to-string algorithm you’ve never heard of
https://vitaut.net/posts/2026/yy-dtoa/
338
Upvotes
r/programming • u/mttd • Aug 12 '26
View all comments
1
u/jezek_2 Aug 13 '26
If you want something simpler and fast you can check out my public domain math library.
It just uses multiplication of the normalized value with the appropriate power of ten. It computes it in a higher precision (128-bit floats, uses just conversion and multiplication so nothing complicated) to get accurate result for 64-bit floats.