summaryrefslogtreecommitdiffstatshomepage
path: root/py/modio.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-29 22:03:13 +0100
committerDamien George <damien.p.george@gmail.com>2016-03-29 22:03:13 +0100
commit03b8bb7ec9f2da5829794ebef0394c0a69b4f643 (patch)
treef3f7ec5dab888c49ae0ed02268fc38a9706df91d /py/modio.c
parentd88250c06eb9f2f56b790c1411718134a148d9f4 (diff)
downloadmicropython-03b8bb7ec9f2da5829794ebef0394c0a69b4f643.tar.gz
micropython-03b8bb7ec9f2da5829794ebef0394c0a69b4f643.zip
py/formatfloat: Fix case of float format where leading digit was "10".
When taking the logarithm of the float to determine the exponent, there are some edge cases that finish the log loop too large. Eg for an input value of 1e32-epsilon, this is actually less than 1e32 from the log-loop table and finishes as 10.0e31 when it should be 1.0e32. It is thus rendered as :e32 (: comes after 9 in ascii). There was the same problem with numbers less than 1.
Diffstat (limited to 'py/modio.c')
0 files changed, 0 insertions, 0 deletions