Came across these blog articles today on float to string:
- Printing Floating-Point Numbers - https://www.ryanjuckett.com/printing-floating-point-numbers/ (https://www.ryanjuckett.com/printing-floating-point-numbers/)
- Printing Floating-Point Numbers - Part 2: Dragon4 - https://www.ryanjuckett.com/printing-floating-point-numbers-part-2-dragon4/ (https://www.ryanjuckett.com/printing-floating-point-numbers-part-2-dragon4/)
- Printing Floating-Point Numbers - Part 3: Formatting - https://www.ryanjuckett.com/printing-floating-point-numbers-part-3-formatting/ (https://www.ryanjuckett.com/printing-floating-point-numbers-part-3-formatting/)
- Printing Floating-Point Numbers - Part 4: Results - https://www.ryanjuckett.com/printing-floating-point-numbers-part-4-results/ (https://www.ryanjuckett.com/printing-floating-point-numbers-part-4-results/)
Also this reference to Bit Twiddling Hacks might be interesting as well: Bit Twiddling Hacks - https://graphics.stanford.edu/~seander/bithacks.html (https://graphics.stanford.edu/~seander/bithacks.html)
Found a github repo which has a copy of the original source (the PrintFloat.zip in part 4 on the website returns a 404)
Also this Dragon4 fork with tiny modifications as well: https://www.framsticks.com/trac/framsticks/browser/cpp/PrintFloat?order=name&desc=True (https://www.framsticks.com/trac/framsticks/browser/cpp/PrintFloat?order=name&desc=True)