summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
Commit message (Collapse)AuthorAgeFilesLines
...
* SF bug [ #409448 ] Complex division is braindeadTim Peters2001-03-181-8/+58
| | | | | | http://sourceforge.net/tracker/?func=detail&aid=409448&group_id=5470&atid=105470 Now less braindead. Also added test_complex.py, which doesn't test much, but fails without this patch.
* When 1.6 boosted the # of digits produced by repr(float), repr(complex)Tim Peters2001-03-111-8/+32
| | | | apparently forgot to play along. Make complex act like float.
* Use rich comparisons to fulfill an old wish: complex numbers now raiseGuido van Rossum2001-01-181-49/+84
| | | | | | | | | | | exceptions when compared using <, <=, > or >=. NOTE: This is a tentative change: this means that cmp() involving complex numbers will raise an exception when the numbers differ, and that in turn means that e.g. dictionaries and certain other compounds (e.g. UserLists) containing complex numbers can't be compared either. So we'll have to decide whether this is acceptable. The alpha test cycle is a good time to keep an eye on this!
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-261-4/+0
| | | | | | | | Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Fix for http://sourceforge.net/bugs/?func=detailbug&bug_id=111866&group_id=5470.Tim Peters2000-08-151-46/+17
| | | | | | | | | | | This was a misleading bug -- the true "bug" was that hash(x) gave an error return when x is an infinity. Fixed that. Added new Py_IS_INFINITY macro to pyport.h. Rearranged code to reduce growing duplication in hashing of float and complex numbers, pushing Trent's earlier stab at that to a logical conclusion. Fixed exceedingly rare bug where hashing of floats could return -1 even if there wasn't an error (didn't waste time trying to construct a test case, it was simply obvious from the code that it *could* happen). Improved complex hash so that hash(complex(x, y)) doesn't systematically equal hash(complex(y, x)) anymore.
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-1/+0
| | | | marked my*.h as obsolete
* ANSI-fication of the sources.Fred Drake2000-07-091-98/+48
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* This patch addresses two main issues: (1) There exist some non-fatalFred Drake2000-06-291-28/+9
| | | | | | | | | | | | | | | | | | | | errors in some of the hash algorithms. For exmaple, in float_hash and complex_hash a certain part of the value is not included in the hash calculation. See Tim's, Guido's, and my discussion of this on python-dev in May under the title "fix float_hash and complex_hash for 64-bit *nix" (2) The hash algorithms that use pointers (e.g. func_hash, code_hash) are universally not correct on Win64 (they assume that sizeof(long) == sizeof(void*)) As well, this patch significantly cleans up the hash code. It adds the two function _Py_HashDouble and _PyHash_VoidPtr that the various hashing routine are changed to use. These help maintain the hash function invariant: (a==b) => (hash(a)==hash(b))) I have added Lib/test/test_hash.py and Lib/test/output/test_hash to test this for some cases.
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-5/+6
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-1/+1
| | | | PyArg_ParseTuple() format string arguments as possible.
* The rest of the changes by Trent Mick and Dale Nagata for warning-freeGuido van Rossum2000-01-201-1/+1
| | | | compilation on NT Alpha. Mostly added casts etc.
* Ai! complex_nonzero() has && which should be ||, else decidedlyGuido van Rossum1999-01-251-1/+1
| | | | | non-zero things like 5j and complex(1,0) are considered to be zero/false. Tim Peters.
* Add check to conjugate() that there are no excess arguments.Guido van Rossum1998-05-071-2/+5
|
* Got rid of c_error in favor of errno (and EDOM/ERANGE).Guido van Rossum1997-05-201-49/+43
| | | | | Assume that errno usage is thread-safe -- most vendors do this by making in a macro that refers to a per-thread storage area.
* Quickly renamed the last directory.Guido van Rossum1997-05-021-110/+108
|
* Remove unused variable.Guido van Rossum1997-04-091-1/+0
|
* Get rid of .conj pseudo data attribute for complex numbers.Guido van Rossum1997-04-011-5/+2
| | | | Add __members__ attribute.
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-6/+6
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-4/+24
| | | | Surround various f.p. operations with PyFPE_{START,END}_PROTECT macros.
* New, better hash for floating point and complexGuido van Rossum1997-01-111-4/+32
|
* Make gcc -Wall happyGuido van Rossum1996-12-051-14/+0
|
* Oops... Need to clear c_error before calling c_quot().Guido van Rossum1996-09-121-0/+2
|
* Properly(?) implemented remainder and divmod (Tim Hochberg)Guido van Rossum1996-09-121-5/+34
|
* Raise exception instead of dropping imag part for conversion to int,Guido van Rossum1996-09-111-11/+9
| | | | | | long, float. Raise exception instead of dumping core for remainder and divmod.
* Don't dump core on complex % or divmod -- raise a TypeError exception.Guido van Rossum1996-09-111-2/+14
|
* Changes to make the file acceptable to K&R C compilers (HPUX, SunOS 4.x).Guido van Rossum1996-08-191-25/+38
|
* complex -> Py_complexGuido van Rossum1996-07-211-40/+40
|
* make some things staticGuido van Rossum1996-05-241-4/+4
|
* use 'j' instead of 'i' for imaginary constantsGuido van Rossum1996-01-251-2/+2
|
* Removed unused varJack Jansen1996-01-251-1/+0
|
* Added PyComplex_AsCComplexGuido van Rossum1996-01-121-0/+12
|
* complex numbers a la Konrad HinsenGuido van Rossum1996-01-121-0/+562