<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/formatfloat.c, branch v1.8.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-03-29T21:07:15+00:00</updated>
<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>
<entry>
<title>py/formatfloat: Handle calculation of integer digit for %f format properly.</title>
<updated>2015-11-22T18:05:08+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-11-22T18:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3d6240ba1b4f6f33a27b9eed7e51286f95d4cbe9'/>
<id>urn:sha1:3d6240ba1b4f6f33a27b9eed7e51286f95d4cbe9</id>
<content type='text'>
%f prints true integer digit, so its calculation should happen before any
exponential scaling.
</content>
</entry>
<entry>
<title>py/formatfloat: Workaround (fix?) incorrect rounding for %f format.</title>
<updated>2015-11-22T16:09:28+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-11-22T16:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3c4c0698021a9eed5ab66b1c47c0180dd1fabcf4'/>
<id>urn:sha1:3c4c0698021a9eed5ab66b1c47c0180dd1fabcf4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/formatfloat: Convert to fully portable implementation.</title>
<updated>2015-11-22T15:54:05+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-11-22T13:42:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9aaccd4735d60798963212d72989a9b9d852fc6d'/>
<id>urn:sha1:9aaccd4735d60798963212d72989a9b9d852fc6d</id>
<content type='text'>
This takes previous IEEE-754 single precision float implementation, and
converts it to fully portable parametrizable implementation using C99
functions like signbit(), isnan(), isinf(). As long as those functions
are available (they can be defined in adhoc manner of course), and
compiler can perform standard arithmetic and comparison operations on a
float type, this implementation will work with any underlying float type
(including types whose mantissa is larger than available intergral integer
type).
</content>
</entry>
<entry>
<title>stmhal: fix single precision float printing error</title>
<updated>2015-09-11T20:09:50+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2015-08-31T22:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9d6128acdccb463edfe9a3b7dbf86417643104bb'/>
<id>urn:sha1:9d6128acdccb463edfe9a3b7dbf86417643104bb</id>
<content type='text'>
Fixes #1435.
</content>
</entry>
<entry>
<title>py: Implement mp_format_float for doubles and use where appropriate</title>
<updated>2015-05-17T20:47:11+00:00</updated>
<author>
<name>stijn</name>
<email>stinos@zoho.com</email>
</author>
<published>2015-05-16T08:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=861670ba2ad6fe575de4a31c95c01070ed900391'/>
<id>urn:sha1:861670ba2ad6fe575de4a31c95c01070ed900391</id>
<content type='text'>
This allows using (almost) the same code for printing floats everywhere,
removes the dependency on sprintf and uses just snprintf and
applies an msvc-specific fix for snprintf in a single place so
nan/inf are now printed correctly.
</content>
</entry>
<entry>
<title>py/formatfloat.c: Fix format of floating point numbers near 1.0.</title>
<updated>2015-04-12T12:06:20+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2015-04-12T07:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b21786947fabbdef76824d899263bec51779738b'/>
<id>urn:sha1:b21786947fabbdef76824d899263bec51779738b</id>
<content type='text'>
In particular, numbers which are less than 1.0 but which
round up to 1.0.

This also makes those numbers which round up to 1.0 to
print with e+00 rather than e-00 for those formats which
print exponents.

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