3 ms·
What’s also interesting is how the “minimum representation needed to roundtrip a number” is actually done. There is recent (2010) research into doing this effic
by saagarjha 6y ago
What’s also interesting is how the “minimum representation needed to roundtrip a number” is actually done. There is recent (2010) research into doing this efficiently using an algorithm called Grisu: https://dl.acm.org/doi/10.1145/1809028.1806623 https://dl.acm.org/doi/10.1145/1809028.1806623. Many programming language implementations use it now for this purpose.
- ygra 6y agoActually, there's even more recent research into doing this really efficiently, using an algorithm called Ryū. [e] https://github.com/ulfjack/ryu https://github.com/ulfjack/ryu [-4] https://www.youtube.com/watch?v=kw-U6smcLzk https://www.youtube.com/watch?v=kw-U6smcLzk [1.73] https://www.youtube.com/watch?v=4P_kbF0EbZM https://www.youtube.com/watch?v=4P_kbF0EbZM
- pklausler 6y agoThe f18 Fortran compiler has a novel algorithm (calculating in base 10^16) for conversions that is fast and doesn't require big look-up tables. https://github.com/llvm/llvm-project/tree/master/flang/lib/Decimal https://github.com/llvm/llvm-project/tree/master/flang/lib/D...