[swfmill] Patch: accurate format for floating point values
INADA Naoki
inadauer at gmail.com
Mon Feb 11 09:48:41 PST 2008
> 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
--
INADA Naoki <inadauer at gmail.com>
Blog: http://d.hatena.ne.jp/methane/ (sorry, Japanese only.)
More information about the swfmill
mailing list