Michael Foord <mich...@voidspace.org.uk> added the comment:

Wondered if you guys had heard of some recent advances in the state of the art 
in this field. I'm sure you have, but thought I'd link it here anywhere.

Quote taken from this article (which links to relevant papers):

http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/

In 2010, Florian Loitsch published a wonderful paper in PLDI, "Printing 
floating-point numbers quickly and accurately with integers", which represents 
the biggest step in this field in 20 years: he mostly figured out how to use 
machine integers to perform accurate rendering! Why do I say "mostly"? Because 
although Loitsch's "Grisu3" algorithm is very fast, it gives up on about 0.5% 
of numbers, in which case you have to fall back to Dragon4 or a derivative.

If you're a language runtime author, the Grisu algorithms are a big deal: 
Grisu3 is about 5 times faster than the algorithm used by printf in GNU libc, 
for instance. A few language implementors have already taken note: Google hired 
Loitsch, and the Grisu family acts as the default rendering algorithms in both 
the V8 and Mozilla Javascript engines (replacing David Gay's 17-year-old dtoa 
code). Loitsch has kindly released implementations of his Grisu algorithms as a 
library named double-conversion.

----------
nosy: +michael.foord

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7117>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to