cpython/Misc
Tim Peters 47e52ee0c5 SF patch 936813: fast modular exponentiation
This checkin is adapted from part 2 (of 3) of Trevor Perrin's patch set.

BACKWARD INCOMPATIBILITY:  SHIFT must now be divisible by 5.  AFAIK,
nobody will care.  long_pow() could be complicated to worm around that,
if necessary.

long_pow():
  - BUGFIX:  This leaked the base and power when the power was negative
    (and so the computation delegated to float pow).
  - Instead of doing right-to-left exponentiation, do left-to-right.  This
    is more efficient for small bases, which is the common case.
  - In addition, if the exponent is large (more than FIVEARY_CUTOFF
    digits), precompute [a**i % c for i in range(32)], and go left to
    right 5 bits at a time.
l_divmod():
  - The signature changed so that callers who don't want the quotient,
    or don't want the remainder, can pass NULL in the slot they don't
    want.  This saves them from having to declare a vrbl for unwanted
    stuff, and remembering to decref it.
long_mod(), long_div(), long_classic_div():
  - Adjust to new l_divmod() signature, and simplified as a result.
2004-08-30 02:44:38 +00:00
..
RPM 2.4a1 2004-07-08 06:01:42 +00:00
ACKS SF patch 936813: fast modular exponentiation 2004-08-29 22:16:50 +00:00
AIX-NOTES The fix to use . was incorporated 2003-06-08 02:25:17 +00:00
BeOS-NOTES
BeOS-setup.py SF bug #999776, zlib home page wrong 2004-07-29 03:55:56 +00:00
HISTORY Update URLs 2004-03-21 18:48:22 +00:00
NEWS SF patch 936813: fast modular exponentiation 2004-08-30 02:44:38 +00:00
NEWS.help Updated (2.3 OK now) 2003-01-03 03:29:58 +00:00
PURIFY.README
Porting
README Add some doc about using valgrind 2004-06-06 19:58:40 +00:00
README.valgrind Made the explanation more accurate; trimmed trailing whitespace; fixed 2004-07-07 02:46:03 +00:00
RFD
SpecialBuilds.txt This is my patch: 2004-08-12 18:19:17 +00:00
cheatsheet SF patch #911431: robot.txt must be robots.txt 2004-03-13 20:27:23 +00:00
find_recursionlimit.py Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
gdbinit eval_frame now has a PyAPI-style name 2004-08-07 20:11:22 +00:00
indent.pro
pymemcompat.h Fix grammatically inept comment. 2002-08-22 13:36:11 +00:00
python-mode.el Sync with python-mode project. Adds two changes: 2003-12-18 21:53:33 +00:00
python.man Remove -U from argument list. 2003-05-26 05:15:35 +00:00
setuid-prog.c
valgrind-python.supp Add some doc about using valgrind 2004-06-06 19:58:40 +00:00
vgrindefs

README

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS		Acknowledgements
AIX-NOTES	Notes for building Python on AIX
BeOS-NOTES	Notes for building on BeOS
BeOS-setup.py	setup.py replacement for BeOS, see BeOS-NOTES
cheatsheet	Quick summary of Python by Ken Manheimer
find_recursionlimit.py  Script to find a value for sys.maxrecursionlimit
gdbinit		Handy stuff to put in your .gdbinit file, if you use gdb
HISTORY		News from previous releases -- oldest last
HPUX-NOTES	Notes about dynamic loading under HP-UX
indent.pro	GNU indent profile approximating my C style
NEWS		News for this release (for some meaning of "this")
Porting		Mini-FAQ on porting to new platforms
PURIFY.README	Information for Purify users
pymemcompat.h	Memory interface compatibility file.
python.man	UNIX man page for the python interpreter
python-mode.el	Emacs mode for editing Python programs
README		The file you're reading now
README.valgrind	Information for Valgrind users, see valgrind-python.supp
RFD		Request For Discussion about a Python newsgroup
RPM		(Old) tools to build RPMs
SpecialBuilds.txt     Describes extra symbols you can set for debug builds
setuid-prog.c	C helper program for set-uid Python scripts
vgrindefs	Python configuration for vgrind (a generic pretty printer)
valgrind-python.supp	Valgrind suppression file, see README.valgrind