[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: why 0.1+0.2-0.3~=0
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 15 Mar 2012 11:03:34 +0100
2012/3/14 Roberto Ierusalimschy <email@example.com>:
>> > 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.
Is there an easy way to get back the hexa string representation of a
given number value ?