<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/float/float2int.py, branch 6.1.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-03-06T15:30:12+00:00</updated>
<entry>
<title>tests/float2int*: Suffix with _intbig, don't run on any other int type.</title>
<updated>2017-03-06T15:30:12+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-03-06T15:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b03941f5e3f7b6b722303a7cf7aedcd75a4a13f'/>
<id>urn:sha1:4b03941f5e3f7b6b722303a7cf7aedcd75a4a13f</id>
<content type='text'>
I.e. they don't run successfully with MICROPY_LONGINT_IMPL_NONE
and MICROPY_LONGINT_IMPL_LONGLONG (the problem is that they generate
different output than CPython, TODO to fix that).
</content>
</entry>
<entry>
<title>float/float2int*: Make actually be parsable for MICROPY_LONGINT_IMPL_NONE.</title>
<updated>2017-03-06T15:23:09+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-03-06T15:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=121fb88988fd4b4511476231943e999cf38b2866'/>
<id>urn:sha1:121fb88988fd4b4511476231943e999cf38b2866</id>
<content type='text'>
The use of large literal numbers is a big no-no when it comes to writing
programs which work with different int representations. Also, some checks
are pretty adhoc (e.g using struct module to check for 64-bitness). This
change bases entire detection on sys.maxsize and integer operarions, and
thus more correct, even if longer.

Note that this change doesn't mean that any of these tests can pass with
anything but MPZ - even despite checking for various int representations,
the tests aren't written to be portable among them.
</content>
</entry>
<entry>
<title>test/float2int: Make test output clearer.</title>
<updated>2016-02-13T15:03:02+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-02-13T14:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dc587a362351ae8d56baf16a91d13d75c5cd62a4'/>
<id>urn:sha1:dc587a362351ae8d56baf16a91d13d75c5cd62a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>modstruct: Rename module to "ustruct", to allow full Python-level impl.</title>
<updated>2015-05-04T13:53:52+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-04T13:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3d3ef36e977b5f5a4153b8df6447f3f73e4726e3'/>
<id>urn:sha1:3d3ef36e977b5f5a4153b8df6447f3f73e4726e3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Update float2int tests for new range classifications</title>
<updated>2015-01-24T21:05:16+00:00</updated>
<author>
<name>David Steinberg</name>
<email>david.steinberg.dev@gmail.com</email>
</author>
<published>2015-01-23T17:52:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4c1a7e0d6a561be5871bb0d36b724f529e55c21d'/>
<id>urn:sha1:4c1a7e0d6a561be5871bb0d36b724f529e55c21d</id>
<content type='text'>
- Tests vary based on build configuration (32/64-bit and internal int type).
- Added tests for exceptions raised on overflow of int type.
</content>
</entry>
<entry>
<title>py: Temporary fix for conversion of float to int when fits in small int.</title>
<updated>2015-01-07T12:10:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-07T12:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ad2307c92c15f0aa90dbd0741fd2538719d0b5e1'/>
<id>urn:sha1:ad2307c92c15f0aa90dbd0741fd2538719d0b5e1</id>
<content type='text'>
Addresses issue #1044 (see also #1040).  Could do with a better fix.
</content>
</entry>
<entry>
<title>py: Raise exception if trying to convert inf/nan to int.</title>
<updated>2015-01-02T23:04:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-02T23:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6fd4b36bc5dfbb6c6a3f85e14269589e6613d26d'/>
<id>urn:sha1:6fd4b36bc5dfbb6c6a3f85e14269589e6613d26d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Fix float to int conversion for large exponents.</title>
<updated>2015-01-02T22:31:41+00:00</updated>
<author>
<name>David Steinberg</name>
<email>david.steinberg.dev@gmail.com</email>
</author>
<published>2015-01-02T12:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6e0b6d02dbe238e6e3d675b51e44b2ac798ddd20'/>
<id>urn:sha1:6e0b6d02dbe238e6e3d675b51e44b2ac798ddd20</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objstr: Fix %d-formatting of floats.</title>
<updated>2014-12-31T00:21:19+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-12-31T00:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2c75665445b555d0bf712566e7d8874e57c5ad81'/>
<id>urn:sha1:2c75665445b555d0bf712566e7d8874e57c5ad81</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Partially fix float to int conversion.</title>
<updated>2014-12-29T22:22:50+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-12-29T22:22:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=12033df511a5a5f0237a764379aacfbceb6c45dd'/>
<id>urn:sha1:12033df511a5a5f0237a764379aacfbceb6c45dd</id>
<content type='text'>
This fixes conversion when float type has more mantissa bits than small int,
and float value has small exponent. This is for example the case of 32-bit
platform using doubles, and converting value of time.time(). Conversion of
floats with larg exponnet is still not handled correctly.
</content>
</entry>
</feed>
