summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_float.py
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000Guido van Rossum2008-01-051-0/+7
| | | | and adds errors for -0x.
* Applied patch #1635: Float patch for inf and nan on Windows (and other ↵Christian Heimes2007-12-181-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 Heimes2007-12-111-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 trunkChristian Heimes2007-12-101-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 codeAlex Martelli2007-08-221-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 raisesAlex Martelli2006-08-231-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 isAlex Martelli2006-08-231-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 Peters2005-06-031-1/+1
|
* This is my patch:Michael W. Hudson2005-05-271-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.