On Nov 28, 2010, at 6:19 PM, Rick Regan wrote:

> On Sun, Nov 28, 2010 at 5:52 PM, Doug Currie <doug.cur...@gmail.com> wrote:
> 
>> 
>> There is a new publication on this subject that may be of interest to those
>> looking at providing solutions:
>> 
>> http://portal.acm.org/citation.cfm?id=1806623
>> 
>> It (Grisu2) works without bignums if you are willing to settle for the
>> shortest string in 99.8% of cases, and an accurate but not shortest string
>> in the remaining cases.
>> 
> 
> Thanks for the reference. I wonder how it compares to David Gay's dtoa.c?

The paper compares the performance of sprintf from glibc 2.11 and Grisu. I 
don't know if glibc sprintf is based on Gay's code; at one point I thought it 
was, but I cannot find an authoritative reference.

In any case, the Grisus benchmarked about 5x to 10x faster than sprintf on 
average for random double inputs. The code should be simpler than dtoa.c since 
there are no bignums involved, and fewer special cases.

Anyone still reading this thread might be interested in the directed rounding 
mode subtleties discovered by Rick Regan: 
http://www.exploringbinary.com/incorrect-directed-conversions-in-david-gays-strtod/

e

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to