summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float
Commit message (Collapse)AuthorAge
* py: Implement raising a big-int to a negative power.Damien George2017-07-25
| | | | | Before this patch raising a big-int to a negative power would just return 0. Now it returns a floating-point number with the correct value.
* py/modmath: Check for zero division in log with 2 args.Damien George2017-07-04
|
* py/formatfloat: Fix number of digits and exponent sign when rounding.Damien George2017-06-13
| | | | | | | 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
* tests/float/builtin_float_minmax: PEP8 fixes.Paul Sokolovsky2017-06-08
|
* tests/float: Convert "sys.exit()" to "raise SystemExit".Damien George2017-06-08
| | | | | The latter is shorter and simpler because it doesn't require importing the sys module.
* tests/float: Add tests for hashing float and complex numbers.Damien George2017-04-04
|
* tests/float/byte*_construct: Skip on missing array module.Paul Sokolovsky2017-04-03
|
* tests/float: Add tests for round() of inf, nan and large number.Damien George2017-03-24
|
* tests/float: Add tests for math funcs that return ints.Damien George2017-03-23
| | | | One should test bigint, inf and nan to make sure all cases are covered.
* tests/float: Make various tests skippable.Paul Sokolovsky2017-03-09
|
* tests/string_format_modulo2: Split off intbig test.Paul Sokolovsky2017-03-07
|
* 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.
* tests/float/complex1: Split out intbig test.Paul Sokolovsky2017-03-06
|
* tests/float: Add tests for zero to a negative power.Damien George2017-02-03
|
* tests/float: Add test for assigning to attribute of complex number.Damien George2017-01-19
|
* tests/float: Improve formatfloat.c test coverage using Python.Rami Ali2017-01-05
|
* tests: Add tests to improve coverage of runtime.c.Rami Ali2016-12-21
|
* tests/float/builtin_float_round: Test round() with second arg.Damien George2016-12-20
|
* tests/float: Add test for parsing a float from an empty string.Damien George2016-09-27
|
* py/formatfloat: Fix further cases of buffer overflow in formatting.Damien George2016-03-29
| | | | | Includes extensive test cases to catch hopefully all cases where buffer might overflow.
* py/formatfloat: Fix buffer overflow when formatting tiny numbers.Damien George2016-03-15
|
* test/string_format_fp30: Variant of string_format for 30-bit stuffed float.Paul Sokolovsky2016-03-06
|
* test/float2int_fp30: Variant of float2int for 30-bit stuffed float.Paul Sokolovsky2016-03-06
|
* float/string_format: Split large test in 2.Paul Sokolovsky2016-02-13
|
* test/float2int: Make test output clearer.Paul Sokolovsky2016-02-13
|
* tests: Fix math_fun_special test so it passes with single prec float.Damien George2016-01-08
|
* tests: Allow float tests to run when MATH_SPECIAL_FUNCTIONS is disabled.Damien George2016-01-08
|
* py/modmath: Add domain error checking to sqrt, log, log2, log10.Michael Buesch2015-12-12
| | | | | These functions will raise 'ValueError: math domain error' on invalid input.
* tests/float/string_format: Add testcase for incorrect rounding for %f.Paul Sokolovsky2015-11-22
|
* py: Catch all cases of integer (big and small) division by zero.Damien George2015-10-01
|
* tests: Add further tests for mpz code.Damien George2015-10-01
|
* stmhal: fix single precision float printing errorDave Hylands2015-09-11
| | | | Fixes #1435.
* py/lexer: Properly classify floats that look like hex numbers.Damien George2015-09-07
| | | | Eg 0e0 almost looks like a hex number but in fact is a float.
* tests: Add a few tests for bool, bytearray, float to improve coverage.Damien George2015-08-29
|
* tests: Add more tests to improve coverage, mostly testing exceptions.Damien George2015-08-21
|
* modbuiltins: Implement round() to precision.Sebastian Plamauer2015-07-19
|
* py: Implement second arg for math.log (optional value for base).Damien George2015-06-13
|
* tests: Add some tests for printing floats to improve coverage.Damien George2015-05-28
|
* py: Remove unnecessary extra handling of padding of nan/inf.Damien George2015-05-28
| | | | | | | C's printf will pad nan/inf differently to CPython. Our implementation originally conformed to C, now it conforms to CPython's way. Tests for this are also added in this patch.
* py: Implement mp_format_float for doubles and use where appropriatestijn2015-05-17
| | | | | | | 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.
* py: Fix printing of complex number when imaginary part is nanstijn2015-05-13
|
* modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky2015-05-04
|
* py: Fix printing of "inf" and "nan" floating point values.Damien George2015-04-22
|
* tests: Add tests to exercise lexer; and some more complex number tests.Damien George2015-04-04
|
* tests: Add missing tests for builtins, and many other things.Damien George2015-04-04
|
* tests: Add tests for SyntaxError, TypeError, and other missing things.Damien George2015-03-25
| | | | This is intended to improve coverage of the test suite.
* tests: Add some more tests for complex numbers and ure module.Damien George2015-03-14
|
* tests: Add tests for things that are not already tested.Damien George2015-03-12
| | | | The aim here is to improve coverage of the code.
* tests: Add tests for boundmeth; and bignum cmp, unary, float, error.Damien George2015-03-03
|