[swfmill] Patch: accurate format for floating point values

Chris Hecker checker at d6.com
Mon Feb 11 10:58:17 PST 2008


You use Gay's strtod and g_fmt from those files.  The dtoa only needs a 
char buf[32] as well, so you don't need to allocate.

Chris


INADA Naoki wrote:
>> I'll make patch and send here again with netlib fp.
> 
> Oops! Netlib have a ftoa() but no atof().
> 
> Python works fine about float as below. I'll try importing from python.
> Python's code is released under GPL-compatible license.
> 
> In [1]: from struct import unpack
> In [2]: d = unpack('>d', '\x00\x0f'+'\xff'*6)[0]
> In [4]: repr(d)
> Out[4]: '2.2250738585072009e-308'
> In [5]: float(repr(d)) == d
> Out[5]: True
> 
> 
> 



More information about the swfmill mailing list