summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/float2int.py
Commit message (Collapse)AuthorAge
* tests/float2int*: Suffix with _intbig, don't run on any other int type.Paul Sokolovsky2017-03-06
| | | | | | 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).
* float/float2int*: Make actually be parsable for MICROPY_LONGINT_IMPL_NONE.Paul Sokolovsky2017-03-06
| | | | | | | | | | | | 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.
* test/float2int: Make test output clearer.Paul Sokolovsky2016-02-13
|
* modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky2015-05-04
|
* tests: Update float2int tests for new range classificationsDavid Steinberg2015-01-24
| | | | | - Tests vary based on build configuration (32/64-bit and internal int type). - Added tests for exceptions raised on overflow of int type.
* py: Temporary fix for conversion of float to int when fits in small int.Damien George2015-01-07
| | | | Addresses issue #1044 (see also #1040). Could do with a better fix.
* py: Raise exception if trying to convert inf/nan to int.Damien George2015-01-02
|
* py: Fix float to int conversion for large exponents.David Steinberg2015-01-02
|
* objstr: Fix %d-formatting of floats.Paul Sokolovsky2014-12-31
|
* py: Partially fix float to int conversion.Paul Sokolovsky2014-12-30
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.