<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/formatfloat.c, branch 4.0.0-rc.3</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-rc.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-rc.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-03-01T06:00:02+00:00</updated>
<entry>
<title>py/formatfloat: Fix case where floats could render with negative digits.</title>
<updated>2018-03-01T06:00:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-01T06:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=955ee6477f4b1d3a70bfe97a1e7727848bf2d06d'/>
<id>urn:sha1:955ee6477f4b1d3a70bfe97a1e7727848bf2d06d</id>
<content type='text'>
Prior to this patch, some architectures (eg unix x86) could render floats
with "negative" digits, like ")".  For example, '%.23e' % 1e-80 would come
out as "1.0000000000000000/)/(,*0e-80".  This patch fixes the known cases.
</content>
</entry>
<entry>
<title>py/formatfloat: Fix case where floats could render with a ":" character.</title>
<updated>2018-03-01T05:02:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-01T05:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7b050fa76c6a763043739d40c82dde839d7f8fd9'/>
<id>urn:sha1:7b050fa76c6a763043739d40c82dde839d7f8fd9</id>
<content type='text'>
Prior to this patch, some architectures (eg unix x86) could render floats
with a ":" character in them, eg 1e+39 would come out as ":e+38" (":" is
just after "9" in ASCII so this is like 10e+38).  This patch fixes some of
these cases.
</content>
</entry>
<entry>
<title>py/formatfloat: Fix rounding of %f format with edge-case FP values.</title>
<updated>2018-03-01T04:51:03+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-01T04:47:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bc12eca461a317df842ce2e616afa97670cd0ce3'/>
<id>urn:sha1:bc12eca461a317df842ce2e616afa97670cd0ce3</id>
<content type='text'>
Prior to this patch the %f formatting of some FP values could be off by up
to 1, eg '%.0f' % 123 would return "122" (unix x64).  Depending on the FP
precision (single vs double) certain numbers would format correctly, but
others wolud not.  This patch should fix all cases of rounding for %f.
</content>
</entry>
<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>
</feed>
