[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: why 0.1+0.2-0.3~=0
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 14 Mar 2012 13:51:32 -0300
> > Does Lua depend on (often poor) native sprintf implementations? or does
> > it use some variant of David Gay's fp routines?
>
> David Gay's dtoa.c is a 86K file with 4356 lines, more than 1/4 of all
> Lua source code. Moreover, I think it is already in several libc,
> including glibc.
Moreover, in Lua 5.2, if you want exact string representations for
doubles, you can (should?) use the hexa format.
-- Roberto