Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | don't require the presence of __getformat__ or __setformat__; use ↵ | Benjamin Peterson | 2010-07-02 | 1 | -42/+49 |
| | | | | requires_IEEE_754 globally | ||||
* | Merge test_strtod and test_float string-to-float conversion tests. | Mark Dickinson | 2010-06-20 | 1 | -102/+0 |
| | |||||
* | Use a more robust infinity check in _Py_HashDouble. | Mark Dickinson | 2010-04-05 | 1 | -0/+9 |
| | | | | | This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.) | ||||
* | Check that 'd' isn't allowed as an exponent specifier in inputs to the float ↵ | Mark Dickinson | 2010-02-12 | 1 | -0/+3 |
| | | | | function. | ||||
* | Remove unused imports in test modules. | Georg Brandl | 2010-02-07 | 1 | -2/+0 |
| | |||||
* | use assert[Not]In where appropriate | Ezio Melotti | 2010-01-23 | 1 | -4/+4 |
| | |||||
* | Issue #7632: Fix a bug in dtoa.c that could lead to incorrectly-rounded ↵ | Mark Dickinson | 2010-01-12 | 1 | -0/+102 |
| | | | | results. | ||||
* | Backport some float repr tests that were missed in issue 7117. | Mark Dickinson | 2010-01-08 | 1 | -0/+49 |
| | |||||
* | Issue #7534: Fix handling of nans, infinities, and negative zero in ** | Mark Dickinson | 2009-12-30 | 1 | -0/+212 |
| | | | | operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch. | ||||
* | Issue #4482: Add tests for special float value formatting. | Eric Smith | 2009-12-02 | 1 | -0/+35 |
| | |||||
* | Issue #3382: Make '%F' and float.__format__('F') convert results to upper ↵ | Eric Smith | 2009-11-29 | 1 | -2/+12 |
| | | | | case. Much of the patch came from Mark Dickinson. | ||||
* | round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this. | Mark Dickinson | 2009-11-24 | 1 | -0/+5 |
| | |||||
* | Issue #7117, continued: Change round implementation to use the ↵ | Mark Dickinson | 2009-11-18 | 1 | -1/+139 |
| | | | | | | | | correctly-rounded string <-> float conversions; this makes sure that the result of the round operation is correctly rounded, and hence displays nicely using the new float repr. | ||||
* | Test long inputs to float | Mark Dickinson | 2009-10-27 | 1 | -0/+5 |
| | |||||
* | Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in | Mark Dickinson | 2009-10-26 | 1 | -2/+0 |
| | | | | | floatobject.c. Also, remove limitation on length of unicode inputs to float(). | ||||
* | convert usage of fail* to assert* | Benjamin Peterson | 2009-06-30 | 1 | -17/+17 |
| | |||||
* | Issue #5981: Fix some float.fromhex bugs related to inf and nan handling. | Mark Dickinson | 2009-05-11 | 1 | -0/+31 |
| | |||||
* | Issue #5920: Changed format.__float__ and complex.__float__ to use a ↵ | Eric Smith | 2009-05-05 | 1 | -0/+47 |
| | | | | precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. | ||||
* | Backport some of the float formatting tests from py3k. | Mark Dickinson | 2009-04-29 | 1 | -0/+19 |
| | |||||
* | Issue #5864: format(1234.5, '.4') gives misleading result | Mark Dickinson | 2009-04-29 | 1 | -0/+5 |
| | | | | (Backport of r72109 from py3k.) | ||||
* | call __float__ on str subclasses #5759 | Benjamin Peterson | 2009-04-15 | 1 | -0/+12 |
| | | | | tests by R. David Murray | ||||
* | fix missing module | Benjamin Peterson | 2008-09-06 | 1 | -1/+1 |
| | |||||
* | #3796: A test class was not run in test_float. | Amaury Forgeot d'Arc | 2008-09-06 | 1 | -1/+3 |
| | | | | Reviewed by Benjamin. | ||||
* | Fix float.fromhex test to give additional information on failure. This | Mark Dickinson | 2008-08-21 | 1 | -1/+7 |
| | | | | | | change is aimed at diagnosing issue 3633 (test_float fails on Solaris). Reviewed by Benjamin Peterson | ||||
* | Fix float.from_hex tests. It appears that Linux/ia64 doesn't like | Mark Dickinson | 2008-07-15 | 1 | -4/+4 |
| | | | | | computing 2.0**-1074 accurately. Using ldexp(1.0, -1074) should be safer. | ||||
* | Issue #3008: add instance method float.hex and class method float.fromhex | Mark Dickinson | 2008-07-15 | 1 | -1/+386 |
| | | | | to convert floats to and from hexadecimal strings respectively. | ||||
* | Issue 3188: accept float('infinity') as well as float('inf'). This | Mark Dickinson | 2008-07-05 | 1 | -1/+17 |
| | | | | | | makes the float constructor behave in the same way as specified by various other language standards, including C99, IEEE 754r, and the IBM Decimal standard. | ||||
* | Moved testing of builtin types out of test_builtin and into type specific ↵ | Benjamin Peterson | 2008-05-03 | 1 | -0/+111 |
| | | | | modules | ||||
* | I finally got the time to update and merge Mark's and my trunk-math branch. ↵ | Christian Heimes | 2008-04-18 | 1 | -5/+16 |
| | | | | | | The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :) | ||||
* | Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000 | Guido van Rossum | 2008-01-05 | 1 | -0/+7 |
| | | | | and adds errors for -0x. | ||||
* | Applied patch #1635: Float patch for inf and nan on Windows (and other ↵ | Christian Heimes | 2007-12-18 | 1 | -1/+72 |
| | | | | | | platforms). The patch unifies float("inf") and repr(float("inf")) on all platforms. | ||||
* | The new float repr causes too much trouble and pain. I'm disabling the ↵ | Christian Heimes | 2007-12-11 | 1 | -1/+2 |
| | | | | | | | feature until we have sorted out the issues on all machines. 64bit machines seem to have issues and Guido has reported even worse. Guido: It's pretty bad actually -- repr(1e5) comes out as '1.0'... Ditto for repr(1eN) for most N... Both in 2.6 and in 3.0... | ||||
* | Backport of r59456:59458 from py3k to trunk | Christian Heimes | 2007-12-10 | 1 | -1/+16 |
| | | | | | | Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'. Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files. | ||||
* | Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code | Alex Martelli | 2007-08-22 | 1 | -0/+15 |
| | | | | | object's co_consts tuple; add a test to show that the previous behavior (where these two constants were "collapsed" into one) causes serious malfunctioning. | ||||
* | Reverting the patch that tried to fix the issue whereby x**2 raises | Alex Martelli | 2006-08-23 | 1 | -14/+1 |
| | | | | | | | OverflowError while x*x succeeds and produces infinity; apparently these inconsistencies cannot be fixed across ``all'' platforms and there's a widespread feeling that therefore ``every'' platform should keep suffering forevermore. Ah well. | ||||
* | x**2 should about equal x*x (including for a float x such that the result is | Alex Martelli | 2006-08-23 | 1 | -1/+14 |
| | | | | | | inf) but didn't; added a test to test_float to verify that, and ignored the ERANGE value for errno in the pow operation to make the new test pass (with help from Marilyn Davis at the Google Python Sprint -- thanks!). | ||||
* | Whitespace normalization. | Tim Peters | 2005-06-03 | 1 | -1/+1 |
| | |||||
* | This is my patch: | Michael W. Hudson | 2005-05-27 | 1 | -0/+110 |
[ 1181301 ] make float packing copy bytes when they can which hasn't been reviewed, despite numerous threats to check it in anyway if noone reviews it. Please read the diff on the checkin list, at least! The basic idea is to examine the bytes of some 'probe values' to see if the current platform is a IEEE 754-ish platform, and if so _PyFloat_{Pack,Unpack}{4,8} just copy bytes around. The rest is hair for testing, and tests. |