3 ms·
You and the rest of this thread's participants may be interested to know that the problem was solved a while ago; you want the "Dragon4" algorithm from "How to
by Kednicma 6y ago
You and the rest of this thread's participants may be interested to know that the problem was solved a while ago; you want the "Dragon4" algorithm from "How to Print Floating-Point Numbers Accurately" [0]. Indeed, the problem is difficult, and having implemented the algorithm, I can confirm that it has earned its reputation. Numeric algorithms are hard and the only reward is accuracy.
[0] https://lists.nongnu.org/archive/html/gcl-devel/2012-10/pdfkieTlklRzN.pdf https://lists.nongnu.org/archive/html/gcl-devel/2012-10/pdfk... or use your search engine
- nextaccountic 6y agoNowadays I think you want Ryu https://www.reddit.com/r/ProgrammingLanguages/comments/930pch/ryu_a_new_algorithm_to_quickly_convert_floating/ https://www.reddit.com/r/ProgrammingLanguages/comments/930pc...