[Python-checkins] python/dist/src/Objects longobject.c,1.137,1.138

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Wed, 14 Aug 2002 10:07:35 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv7625/python/Objects

Modified Files:
	longobject.c 
Log Message:
k_mul() comments:  Simplified the simplified explanation of why ah*bh and
al*bl "always fit":  it's actually trivial given what came before.


Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -C2 -d -r1.137 -r1.138
*** longobject.c	14 Aug 2002 16:36:23 -0000	1.137
--- longobject.c	14 Aug 2002 17:07:32 -0000	1.138
***************
*** 1793,1802 ****
  2*shift+1 digits + 2 bits, and again 2*shift+2 digits is enough to hold it.
  
! Note that the "lazy" analysis is enough to show that there's always enough
! room to subtract al*bl and ah*bh.  al and bl each have no more than shift
! digits, so al*bl has no more than 2*shift, so there's at least one digit
! to spare in the remaining allocated digits.  The same is true for ah*bh when
! bsize is even.  When bsize is odd, ah*bh has at most 2*shift+2 digits, and
! there are at least that many remaining allocated digits when bsize is odd.
  */
  
--- 1793,1799 ----
  2*shift+1 digits + 2 bits, and again 2*shift+2 digits is enough to hold it.
  
! Note that since there's always enough room for (ah+al)*(bh+bl), and that's
! clearly >= each of ah*bh and al*bl, there's always enough room to subtract
! ah*bh and al*bl too.
  */