<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/formatfloat.c, branch 4.0.0-alpha</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-10T05:27:54+00:00</updated>
<entry>
<title>py/formatfloat: Use standard isinf, isnan funcs instead of custom ones.</title>
<updated>2017-10-10T05:27:54+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-10T05:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dc948e4d54eb8f7fecbd26efcfb3cd5d02bf8500'/>
<id>urn:sha1:dc948e4d54eb8f7fecbd26efcfb3cd5d02bf8500</id>
<content type='text'>
Reduces code size by a tiny bit.
</content>
</entry>
<entry>
<title>py/formatfloat: Don't print the negative sign of a NaN value.</title>
<updated>2017-10-10T05:01:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T12:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=08a196697c5dfb8cbe3b3e85c1c5f94e3a27804c'/>
<id>urn:sha1:08a196697c5dfb8cbe3b3e85c1c5f94e3a27804c</id>
<content type='text'>
NaN may have the sign bit set but it has no meaning, so don't print it out.
</content>
</entry>
<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>
</feed>
