<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/formatfloat.c, branch 3.0.0-alpha.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-alpha.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-alpha.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-08-21T12:04:23+00:00</updated>
<entry>
<title>py/formatfloat: Don't post-increment variable that won't be used again.</title>
<updated>2017-08-21T12:04:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-08-21T12:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f5309fc4ffa2ee2bf562e18eef3e16e1c22dfb66'/>
<id>urn:sha1:f5309fc4ffa2ee2bf562e18eef3e16e1c22dfb66</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>all: Remove trailing spaces, per coding conventions.</title>
<updated>2017-07-19T03:12:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-07-19T03:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=761e4c7ff62896c7d8f8c3dfc3cc98a4cc4f2f6f'/>
<id>urn:sha1:761e4c7ff62896c7d8f8c3dfc3cc98a4cc4f2f6f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py,extmod: Some casts and minor refactors to quiet compiler warnings.</title>
<updated>2017-07-07T01:32:22+00:00</updated>
<author>
<name>Tom Collins</name>
<email>tom.collins@digi.com</email>
</author>
<published>2017-06-30T23:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=145796f037715e180b441b38c1ec1ba45ff77797'/>
<id>urn:sha1:145796f037715e180b441b38c1ec1ba45ff77797</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/formatfloat: Fix number of digits and exponent sign when rounding.</title>
<updated>2017-06-13T03:36:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-13T03:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6ed4581f545069488446682ee9b052798626327d'/>
<id>urn:sha1:6ed4581f545069488446682ee9b052798626327d</id>
<content type='text'>
This patch fixes 2 things when printing a floating-point number that
requires rounding up of the mantissa:
- retain the correct precision; eg 0.99 becomes 1.0, not 1.00
- if the exponent goes from -1 to 0 then render it as +0, not -0
</content>
</entry>
<entry>
<title>py/formatfloat: Remove unreachable code.</title>
<updated>2017-01-19T12:32:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-01-19T12:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=94a587a7506b04918417aa64aa2835f039263fa0'/>
<id>urn:sha1:94a587a7506b04918417aa64aa2835f039263fa0</id>
<content type='text'>
The if-block that this unreachable code is in has a condition "f&gt;=5" so
"fp_isless1(f)" will always fail.
</content>
</entry>
<entry>
<title>py/formatfloat: Fix further cases of buffer overflow in formatting.</title>
<updated>2016-03-29T21:07:15+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-29T21:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e1e7657277f0c3ea6a207fa7768110475a52c39c'/>
<id>urn:sha1:e1e7657277f0c3ea6a207fa7768110475a52c39c</id>
<content type='text'>
Includes extensive test cases to catch hopefully all cases where
buffer might overflow.
</content>
</entry>
<entry>
<title>py/formatfloat: Fix case of float format where leading digit was "10".</title>
<updated>2016-03-29T21:03:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-29T21:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=03b8bb7ec9f2da5829794ebef0394c0a69b4f643'/>
<id>urn:sha1:03b8bb7ec9f2da5829794ebef0394c0a69b4f643</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>py/formatfloat: Fix buffer overflow when formatting tiny numbers.</title>
<updated>2016-03-15T12:21:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-15T12:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cea6cf8a5e87127eccc8214cbffa2d4c8aae8527'/>
<id>urn:sha1:cea6cf8a5e87127eccc8214cbffa2d4c8aae8527</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/formatfloat: Add ability to format doubles with exponents &gt; 99.</title>
<updated>2016-01-29T11:39:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-29T11:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7417ccfb0d27c7c09b5ed6468a9e3ca729af41bb'/>
<id>urn:sha1:7417ccfb0d27c7c09b5ed6468a9e3ca729af41bb</id>
<content type='text'>
For single prec, exponents never get larger than about 37.  For double
prec, exponents can be larger than 99 and need 3 bytes to format.  This
patch makes the number of bytes needed configurable.

Addresses issue #1772.
</content>
</entry>
</feed>
