[Python-3000-checkins] r59187 - in python/branches/py3k: Demo/tkinter/guido/brownian2.py Doc/library/os.rst Doc/library/subprocess.rst Doc/library/unittest.rst Doc/library/xml.dom.rst Doc/whatsnew/2.6.rst Lib/decimal.py Lib/doctest.py Lib/test/decimaltestdata/abs.decTest Lib/test/decimaltestdata/add.decTest Lib/test/decimaltestdata/and.decTest Lib/test/decimaltestdata/base.decTest Lib/test/decimaltestdata/clamp.decTest Lib/test/decimaltestdata/class.decTest Lib/test/decimaltestdata/compare.decTest Lib/test/decimaltestdata/comparetotal.decTest Lib/test/decimaltestdata/comparetotmag.decTest Lib/test/decimaltestdata/copy.decTest Lib/test/decimaltestdata/copyabs.decTest Lib/test/decimaltestdata/copynegate.decTest Lib/test/decimaltestdata/copysign.decTest Lib/test/decimaltestdata/ddAbs.decTest Lib/test/decimaltestdata/ddAdd.decTest Lib/test/decimaltestdata/ddAnd.decTest Lib/test/decimaltestdata/ddBase.decTest Lib/test/decimaltestdata/ddCanonical.decTest Lib/test/decimaltestdata/ddClass.decTest Lib/test/decimaltestdata/ddCompare.decTest Lib/test/decimaltestdata/ddCompareSig.decTest Lib/test/decimaltestdata/ddCompareTotal.decTest Lib/test/decimaltestdata/ddCompareTotalMag.decTest Lib/test/decimaltestdata/ddCopy.decTest Lib/test/decimaltestdata/ddCopyAbs.decTest Lib/test/decimaltestdata/ddCopyNegate.decTest Lib/test/decimaltestdata/ddCopySign.decTest Lib/test/decimaltestdata/ddDivide.decTest Lib/test/decimaltestdata/ddDivideInt.decTest Lib/test/decimaltestdata/ddEncode.decTest Lib/test/decimaltestdata/ddFMA.decTest Lib/test/decimaltestdata/ddInvert.decTest Lib/test/decimaltestdata/ddLogB.decTest Lib/test/decimaltestdata/ddMax.decTest Lib/test/decimaltestdata/ddMaxMag.decTest Lib/test/decimaltestdata/ddMin.decTest Lib/test/decimaltestdata/ddMinMag.decTest Lib/test/decimaltestdata/ddMinus.decTest Lib/test/decimaltestdata/ddMultiply.decTest Lib/test/decimaltestdata/ddNextMinus.decTest Lib/test/decimaltestdata/ddNextPlus.decTest Lib/test/decimaltestdata/ddNextToward.decTest Lib/test/decimaltestdata/ddOr.decTest Lib/test/decimaltestdata/ddPlus.decTest Lib/test/decimaltestdata/ddQuantize.decTest Lib/test/decimaltestdata/ddReduce.decTest Lib/test/decimaltestdata/ddRemainder.decTest Lib/test/decimaltestdata/ddRemainderNear.decTest Lib/test/decimaltestdata/ddRotate.decTest Lib/test/decimaltestdata/ddSameQuantum.decTest Lib/test/decimaltestdata/ddScaleB.decTest Lib/test/decimaltestdata/ddShift.decTest Lib/test/decimaltestdata/ddSubtract.decTest Lib/test/decimaltestdata/ddToIntegral.decTest Lib/test/decimaltestdata/ddXor.decTest Lib/test/decimaltestdata/decDouble.decTest Lib/test/decimaltestdata/decQuad.decTest Lib/test/decimaltestdata/decSingle.decTest Lib/test/decimaltestdata/divide.decTest Lib/test/decimaltestdata/divideint.decTest Lib/test/decimaltestdata/dqAbs.decTest Lib/test/decimaltestdata/dqAdd.decTest Lib/test/decimaltestdata/dqAnd.decTest Lib/test/decimaltestdata/dqBase.decTest Lib/test/decimaltestdata/dqCanonical.decTest Lib/test/decimaltestdata/dqClass.decTest Lib/test/decimaltestdata/dqCompare.decTest Lib/test/decimaltestdata/dqCompareSig.decTest Lib/test/decimaltestdata/dqCompareTotal.decTest Lib/test/decimaltestdata/dqCompareTotalMag.decTest Lib/test/decimaltestdata/dqCopy.decTest Lib/test/decimaltestdata/dqCopyAbs.decTest Lib/test/decimaltestdata/dqCopyNegate.decTest Lib/test/decimaltestdata/dqCopySign.decTest Lib/test/decimaltestdata/dqDivide.decTest Lib/test/decimaltestdata/dqDivideInt.decTest Lib/test/decimaltestdata/dqEncode.decTest Lib/test/decimaltestdata/dqFMA.decTest Lib/test/decimaltestdata/dqInvert.decTest Lib/test/decimaltestdata/dqLogB.decTest Lib/test/decimaltestdata/dqMax.decTest Lib/test/decimaltestdata/dqMaxMag.decTest Lib/test/decimaltestdata/dqMin.decTest Lib/test/decimaltestdata/dqMinMag.decTest Lib/test/decimaltestdata/dqMinus.decTest Lib/test/decimaltestdata/dqMultiply.decTest Lib/test/decimaltestdata/dqNextMinus.decTest Lib/test/decimaltestdata/dqNextPlus.decTest Lib/test/decimaltestdata/dqNextToward.decTest Lib/test/decimaltestdata/dqOr.decTest Lib/test/decimaltestdata/dqPlus.decTest Lib/test/decimaltestdata/dqQuantize.decTest Lib/test/decimaltestdata/dqReduce.decTest Lib/test/decimaltestdata/dqRemainder.decTest Lib/test/decimaltestdata/dqRemainderNear.decTest Lib/test/decimaltestdata/dqRotate.decTest Lib/test/decimaltestdata/dqSameQuantum.decTest Lib/test/decimaltestdata/dqScaleB.decTest Lib/test/decimaltestdata/dqShift.decTest Lib/test/decimaltestdata/dqSubtract.decTest Lib/test/decimaltestdata/dqToIntegral.decTest Lib/test/decimaltestdata/dqXor.decTest Lib/test/decimaltestdata/dsBase.decTest Lib/test/decimaltestdata/dsEncode.decTest Lib/test/decimaltestdata/exp.decTest Lib/test/decimaltestdata/fma.decTest Lib/test/decimaltestdata/inexact.decTest Lib/test/decimaltestdata/invert.decTest Lib/test/decimaltestdata/ln.decTest Lib/test/decimaltestdata/log10.decTest Lib/test/decimaltestdata/logb.decTest Lib/test/decimaltestdata/max.decTest Lib/test/decimaltestdata/maxmag.decTest Lib/test/decimaltestdata/min.decTest Lib/test/decimaltestdata/minmag.decTest Lib/test/decimaltestdata/minus.decTest Lib/test/decimaltestdata/multiply.decTest Lib/test/decimaltestdata/nextminus.decTest Lib/test/decimaltestdata/nextplus.decTest Lib/test/decimaltestdata/nexttoward.decTest Lib/test/decimaltestdata/or.decTest Lib/test/decimaltestdata/plus.decTest Lib/test/decimaltestdata/power.decTest Lib/test/decimaltestdata/powersqrt.decTest Lib/test/decimaltestdata/quantize.decTest Lib/test/decimaltestdata/randomBound32.decTest Lib/test/decimaltestdata/randoms.decTest Lib/test/decimaltestdata/reduce.decTest Lib/test/decimaltestdata/remainder.decTest Lib/test/decimaltestdata/remainderNear.decTest Lib/test/decimaltestdata/rescale.decTest Lib/test/decimaltestdata/rotate.decTest Lib/test/decimaltestdata/rounding.decTest Lib/test/decimaltestdata/samequantum.decTest Lib/test/decimaltestdata/scaleb.decTest Lib/test/decimaltestdata/shift.decTest Lib/test/decimaltestdata/squareroot.decTest Lib/test/decimaltestdata/subtract.decTest Lib/test/decimaltestdata/testall.decTest Lib/test/decimaltestdata/tointegral.decTest Lib/test/decimaltestdata/tointegralx.decTest Lib/test/decimaltestdata/xor.decTest Lib/test/test_decimal.py Lib/test/test_doctest.py Lib/test/test_funcattrs.py Lib/trace.py Modules/posixmodule.c Objects/cellobject.c Python/ast.c

guido.van.rossum python-3000-checkins at python.org
Tue Nov 27 00:23:22 CET 2007


Author: guido.van.rossum
Date: Tue Nov 27 00:23:18 2007
New Revision: 59187

Added:
   python/branches/py3k/Demo/tkinter/guido/brownian2.py
      - copied unchanged from r59186, python/trunk/Demo/tkinter/guido/brownian2.py
Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Doc/library/os.rst
   python/branches/py3k/Doc/library/subprocess.rst
   python/branches/py3k/Doc/library/unittest.rst
   python/branches/py3k/Doc/library/xml.dom.rst
   python/branches/py3k/Doc/whatsnew/2.6.rst
   python/branches/py3k/Lib/decimal.py
   python/branches/py3k/Lib/doctest.py
   python/branches/py3k/Lib/test/decimaltestdata/abs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/add.decTest
   python/branches/py3k/Lib/test/decimaltestdata/and.decTest
   python/branches/py3k/Lib/test/decimaltestdata/base.decTest
   python/branches/py3k/Lib/test/decimaltestdata/clamp.decTest
   python/branches/py3k/Lib/test/decimaltestdata/class.decTest
   python/branches/py3k/Lib/test/decimaltestdata/compare.decTest
   python/branches/py3k/Lib/test/decimaltestdata/comparetotal.decTest
   python/branches/py3k/Lib/test/decimaltestdata/comparetotmag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/copy.decTest
   python/branches/py3k/Lib/test/decimaltestdata/copyabs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/copynegate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/copysign.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddAbs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddAdd.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddAnd.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddBase.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCanonical.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddClass.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCompare.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCompareSig.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotal.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotalMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCopy.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCopyAbs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCopyNegate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddCopySign.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddDivide.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddDivideInt.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddEncode.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddFMA.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddInvert.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddLogB.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMax.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMaxMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMin.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMinMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMinus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddMultiply.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddNextMinus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddNextPlus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddNextToward.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddOr.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddPlus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddQuantize.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddReduce.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddRemainder.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddRemainderNear.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddRotate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddSameQuantum.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddScaleB.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddShift.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddSubtract.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddToIntegral.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ddXor.decTest
   python/branches/py3k/Lib/test/decimaltestdata/decDouble.decTest
   python/branches/py3k/Lib/test/decimaltestdata/decQuad.decTest
   python/branches/py3k/Lib/test/decimaltestdata/decSingle.decTest
   python/branches/py3k/Lib/test/decimaltestdata/divide.decTest
   python/branches/py3k/Lib/test/decimaltestdata/divideint.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqAbs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqAdd.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqAnd.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqBase.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCanonical.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqClass.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCompare.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCompareSig.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotal.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotalMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCopy.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCopyAbs.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCopyNegate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqCopySign.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqDivide.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqDivideInt.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqEncode.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqFMA.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqInvert.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqLogB.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMax.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMaxMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMin.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMinMag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMinus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqMultiply.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqNextMinus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqNextPlus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqNextToward.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqOr.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqPlus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqQuantize.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqReduce.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqRemainder.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqRemainderNear.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqRotate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqSameQuantum.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqScaleB.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqShift.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqSubtract.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqToIntegral.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dqXor.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dsBase.decTest
   python/branches/py3k/Lib/test/decimaltestdata/dsEncode.decTest
   python/branches/py3k/Lib/test/decimaltestdata/exp.decTest
   python/branches/py3k/Lib/test/decimaltestdata/fma.decTest
   python/branches/py3k/Lib/test/decimaltestdata/inexact.decTest
   python/branches/py3k/Lib/test/decimaltestdata/invert.decTest
   python/branches/py3k/Lib/test/decimaltestdata/ln.decTest
   python/branches/py3k/Lib/test/decimaltestdata/log10.decTest
   python/branches/py3k/Lib/test/decimaltestdata/logb.decTest
   python/branches/py3k/Lib/test/decimaltestdata/max.decTest
   python/branches/py3k/Lib/test/decimaltestdata/maxmag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/min.decTest
   python/branches/py3k/Lib/test/decimaltestdata/minmag.decTest
   python/branches/py3k/Lib/test/decimaltestdata/minus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/multiply.decTest
   python/branches/py3k/Lib/test/decimaltestdata/nextminus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/nextplus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/nexttoward.decTest
   python/branches/py3k/Lib/test/decimaltestdata/or.decTest
   python/branches/py3k/Lib/test/decimaltestdata/plus.decTest
   python/branches/py3k/Lib/test/decimaltestdata/power.decTest
   python/branches/py3k/Lib/test/decimaltestdata/powersqrt.decTest
   python/branches/py3k/Lib/test/decimaltestdata/quantize.decTest
   python/branches/py3k/Lib/test/decimaltestdata/randomBound32.decTest
   python/branches/py3k/Lib/test/decimaltestdata/randoms.decTest
   python/branches/py3k/Lib/test/decimaltestdata/reduce.decTest
   python/branches/py3k/Lib/test/decimaltestdata/remainder.decTest
   python/branches/py3k/Lib/test/decimaltestdata/remainderNear.decTest
   python/branches/py3k/Lib/test/decimaltestdata/rescale.decTest
   python/branches/py3k/Lib/test/decimaltestdata/rotate.decTest
   python/branches/py3k/Lib/test/decimaltestdata/rounding.decTest
   python/branches/py3k/Lib/test/decimaltestdata/samequantum.decTest
   python/branches/py3k/Lib/test/decimaltestdata/scaleb.decTest
   python/branches/py3k/Lib/test/decimaltestdata/shift.decTest
   python/branches/py3k/Lib/test/decimaltestdata/squareroot.decTest
   python/branches/py3k/Lib/test/decimaltestdata/subtract.decTest
   python/branches/py3k/Lib/test/decimaltestdata/testall.decTest
   python/branches/py3k/Lib/test/decimaltestdata/tointegral.decTest
   python/branches/py3k/Lib/test/decimaltestdata/tointegralx.decTest
   python/branches/py3k/Lib/test/decimaltestdata/xor.decTest
   python/branches/py3k/Lib/test/test_decimal.py
   python/branches/py3k/Lib/test/test_doctest.py
   python/branches/py3k/Lib/test/test_funcattrs.py
   python/branches/py3k/Lib/trace.py
   python/branches/py3k/Modules/posixmodule.c
   python/branches/py3k/Objects/cellobject.c
   python/branches/py3k/Python/ast.c
Log:
Merged revisions 59107-59186 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

(Note: some conflicts in the PCbuild9 directory reverted.  Sorry Christian!)

........
  r59120 | christian.heimes | 2007-11-22 03:21:16 -0800 (Thu, 22 Nov 2007) | 3 lines
  
  Backport of the PCbuild9 directory from the py3k branch.
  I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
  Have fun! :)
........
  r59126 | brett.cannon | 2007-11-22 16:06:51 -0800 (Thu, 22 Nov 2007) | 2 lines
  
  Fix a bug in the test for using __loader__.get_data().
........
  r59131 | christian.heimes | 2007-11-22 23:05:03 -0800 (Thu, 22 Nov 2007) | 1 line
  
  Backport of PCbuild9 fixes from py3k r59130
........
  r59132 | christian.heimes | 2007-11-23 01:10:36 -0800 (Fri, 23 Nov 2007) | 2 lines
  
  Applied patch #1754273 and #1754271 from Thomas Glee
  The patches are adding deprecation warnings for back ticks and <>
........
  r59133 | christian.heimes | 2007-11-23 04:12:02 -0800 (Fri, 23 Nov 2007) | 2 lines
  
  Fixed problems in the last commit. Filenames and line numbers weren't reported correctly.
  Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.
........
  r59134 | christian.heimes | 2007-11-23 04:16:35 -0800 (Fri, 23 Nov 2007) | 1 line
  
  How did the comment get there?
........
  r59135 | christian.heimes | 2007-11-23 05:25:31 -0800 (Fri, 23 Nov 2007) | 1 line
  
  And yet another fix for the patch. Paul Moore has send me a note that I've missed a declaration. The additional code has moved the declaration in the middle of the block.
........
  r59136 | andrew.kuchling | 2007-11-23 05:37:39 -0800 (Fri, 23 Nov 2007) | 1 line
  
  Add item
........
  r59137 | skip.montanaro | 2007-11-23 09:08:35 -0800 (Fri, 23 Nov 2007) | 2 lines
  
  Make trace and doctest play nice together (issue 1429818).  Will backport.
........
  r59139 | skip.montanaro | 2007-11-23 09:12:47 -0800 (Fri, 23 Nov 2007) | 1 line
  
  issue 1429818
........
  r59144 | facundo.batista | 2007-11-23 09:59:00 -0800 (Fri, 23 Nov 2007) | 10 lines
  
  
  Major change in the internal structure of the Decimal
  number: now it does not store the mantissa as a tuple
  of numbers, but as a string. 
  
  This avoids a lot of conversions, and achieves a
  speedup of 40%. The API remains intact.
  
  Thanks Mark Dickinson.
........
  r59146 | facundo.batista | 2007-11-23 10:14:50 -0800 (Fri, 23 Nov 2007) | 3 lines
  
  
  Test cases from Cowlishaw, v2.57. All are pased cleanly.
........
  r59156 | christian.heimes | 2007-11-23 17:36:02 -0800 (Fri, 23 Nov 2007) | 2 lines
  
  Added filename to compiling struct based on Martin's suggestion.
  I'm wonder why I was trying to add the filename to the node all the time. The compiling struct is more obvious.
........
  r59158 | christian.heimes | 2007-11-23 17:53:59 -0800 (Fri, 23 Nov 2007) | 2 lines
  
  Backport of fixes from py3k branch
  svn merge -r59131:HEAD ../../py3k/PCbuild9/ .
........
  r59159 | skip.montanaro | 2007-11-23 20:29:08 -0800 (Fri, 23 Nov 2007) | 1 line
  
  revert change that breaks test_doctest (which I forgot to run - sorry)
........
  r59162 | skip.montanaro | 2007-11-23 20:31:15 -0800 (Fri, 23 Nov 2007) | 1 line
  
  revert
........
  r59164 | georg.brandl | 2007-11-24 03:31:46 -0800 (Sat, 24 Nov 2007) | 3 lines
  
  #1344: document that you need to open std{in,out,err} with PIPE if you want
  communicate() to work as described.
........
  r59165 | georg.brandl | 2007-11-24 03:39:13 -0800 (Sat, 24 Nov 2007) | 2 lines
  
  #1467: fix documentation for TestResult.add{Error,Failure}.
........
  r59166 | georg.brandl | 2007-11-24 03:42:14 -0800 (Sat, 24 Nov 2007) | 2 lines
  
  #1355: remove mention of PyXML from xml.dom docs.
........
  r59169 | amaury.forgeotdarc | 2007-11-24 05:20:22 -0800 (Sat, 24 Nov 2007) | 2 lines
  
  Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.
........
  r59170 | amaury.forgeotdarc | 2007-11-24 05:44:17 -0800 (Sat, 24 Nov 2007) | 3 lines
  
  Issue #1445: Fix a SystemError when accessing the ``cell_contents``
  attribute of an empty cell object.  Now a ValueError is raised.
........
  r59172 | georg.brandl | 2007-11-24 05:56:09 -0800 (Sat, 24 Nov 2007) | 3 lines
  
  #1735632: add O_NOATIME constant to os module.
  Also document a few other O_ constants that were missing from documentation.
........
  r59173 | skip.montanaro | 2007-11-24 06:30:47 -0800 (Sat, 24 Nov 2007) | 1 line
  
  back in these go - thanks to Titus Brown for the fix
........
  r59176 | martin.v.loewis | 2007-11-24 10:33:40 -0800 (Sat, 24 Nov 2007) | 2 lines
  
  Bug #1494: Document that appendChild removes first.
........
  r59186 | guido.van.rossum | 2007-11-26 14:16:49 -0800 (Mon, 26 Nov 2007) | 2 lines
  
  A thread-less variant of brownian.py, submitted by Michele Simoniato.
........


Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst	(original)
+++ python/branches/py3k/Doc/library/os.rst	Tue Nov 27 00:23:18 2007
@@ -597,14 +597,7 @@
 
 
 .. data:: O_BINARY
-
-   Option for the *flag* argument to the :func:`open` function. This can be
-   bit-wise OR'd together with those listed above. Availability: Windows.
-
-   .. % XXX need to check on the availability of this one.
-
-
-.. data:: O_NOINHERIT
+          O_NOINHERIT
           O_SHORT_LIVED
           O_TEMPORARY
           O_RANDOM
@@ -615,6 +608,15 @@
    bit-wise OR'd together. Availability: Windows.
 
 
+.. data:: O_DIRECT
+          O_DIRECTORY
+          O_NOFOLLOW
+          O_NOATIME
+
+   Options for the *flag* argument to the :func:`open` function. These are
+   GNU extensions and not present if they are not defined by the C library.
+
+
 .. data:: SEEK_SET
           SEEK_CUR
           SEEK_END

Modified: python/branches/py3k/Doc/library/subprocess.rst
==============================================================================
--- python/branches/py3k/Doc/library/subprocess.rst	(original)
+++ python/branches/py3k/Doc/library/subprocess.rst	Tue Nov 27 00:23:18 2007
@@ -189,7 +189,12 @@
 
    communicate() returns a tuple (stdout, stderr).
 
-   .. note::
+   Note that if you want to send data to the process's stdin, you need to create
+   the Popen object with ``stdin=PIPE``.  Similarly, to get anything other than
+   ``None`` in the result tuple, you need to give ``stdout=PIPE`` and/or
+   ``stderr=PIPE`` too.
+
+.. note::
 
       The data read is buffered in memory, so do not use this method if the data size
       is large or unlimited.

Modified: python/branches/py3k/Doc/library/unittest.rst
==============================================================================
--- python/branches/py3k/Doc/library/unittest.rst	(original)
+++ python/branches/py3k/Doc/library/unittest.rst	Tue Nov 27 00:23:18 2007
@@ -804,8 +804,9 @@
    Called when the test case *test* raises an unexpected exception *err* is a tuple
    of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``.
 
-   The default implementation appends ``(test, err)`` to the instance's ``errors``
-   attribute.
+   The default implementation appends a tuple ``(test, formatted_err)`` to the
+   instance's ``errors`` attribute, where *formatted_err* is a formatted
+   traceback derived from *err*.
 
 
 .. method:: TestResult.addFailure(test, err)
@@ -813,8 +814,9 @@
    Called when the test case *test* signals a failure. *err* is a tuple of the form
    returned by :func:`sys.exc_info`:  ``(type, value, traceback)``.
 
-   The default implementation appends ``(test, err)`` to the instance's
-   ``failures`` attribute.
+   The default implementation appends a tuple ``(test, formatted_err)`` to the
+   instance's ``failures`` attribute, where *formatted_err* is a formatted
+   traceback derived from *err*.
 
 
 .. method:: TestResult.addSuccess(test)

Modified: python/branches/py3k/Doc/library/xml.dom.rst
==============================================================================
--- python/branches/py3k/Doc/library/xml.dom.rst	(original)
+++ python/branches/py3k/Doc/library/xml.dom.rst	Tue Nov 27 00:23:18 2007
@@ -29,11 +29,14 @@
 
 The Document Object Model is being defined by the W3C in stages, or "levels" in
 their terminology.  The Python mapping of the API is substantially based on the
-DOM Level 2 recommendation.  The mapping of the Level 3 specification, currently
-only available in draft form, is being developed by the `Python XML Special
-Interest Group <http://www.python.org/sigs/xml-sig/>`_ as part of the `PyXML
-package <http://pyxml.sourceforge.net/>`_.  Refer to the documentation bundled
-with that package for information on the current state of DOM Level 3 support.
+DOM Level 2 recommendation.
+
+.. XXX PyXML is dead...
+.. The mapping of the Level 3 specification, currently
+   only available in draft form, is being developed by the `Python XML Special
+   Interest Group <http://www.python.org/sigs/xml-sig/>`_ as part of the `PyXML
+   package <http://pyxml.sourceforge.net/>`_.  Refer to the documentation bundled
+   with that package for information on the current state of DOM Level 3 support.
 
 .. % What if your needs are somewhere between SAX and the DOM?  Perhaps
 .. % you cannot afford to load the entire tree in memory but you find the
@@ -74,10 +77,6 @@
    `Document Object Model (DOM) Level 1 Specification <http://www.w3.org/TR/REC-DOM-Level-1/>`_
       The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`.
 
-   `PyXML <http://pyxml.sourceforge.net>`_
-      Users that require a full-featured implementation of DOM should use the PyXML
-      package.
-
    `Python Language Mapping Specification <http://www.omg.org/docs/formal/02-11-05.pdf>`_
       This specifies the mapping from OMG IDL to Python.
 
@@ -364,8 +363,9 @@
 
 .. method:: Node.appendChild(newChild)
 
-   Add a new child node to this node at the end of the list of children, returning
-   *newChild*.
+   Add a new child node to this node at the end of the list of
+   children, returning *newChild*. If the node was already in
+   in the tree, it is removed first.
 
 
 .. method:: Node.insertBefore(newChild, refChild)

Modified: python/branches/py3k/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/2.6.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/2.6.rst	Tue Nov 27 00:23:18 2007
@@ -872,6 +872,10 @@
 
 Changes to Python's build process and to the C API include:
 
+* Python 2.6 can be built with Microsoft Visual Studio 2008.
+  See the :file:`PCbuild9` directory for the build files.
+  (Implemented by Christian Heimes.)
+
 * The BerkeleyDB module now has a C API object, available as 
   ``bsddb.db.api``.   This object can be used by other C extensions
   that wish to use the :mod:`bsddb` module for their own purposes.

Modified: python/branches/py3k/Lib/decimal.py
==============================================================================
--- python/branches/py3k/Lib/decimal.py	(original)
+++ python/branches/py3k/Lib/decimal.py	Tue Nov 27 00:23:18 2007
@@ -214,10 +214,10 @@
     def handle(self, context, *args):
         if args:
             if args[0] == 1:  # sNaN, must drop 's' but keep diagnostics
-                ans = Decimal((args[1]._sign, args[1]._int, 'n'))
+                ans = _dec_from_triple(args[1]._sign, args[1]._int, 'n', True)
                 return ans._fix_nan(context)
             elif args[0] == 2:
-                return Decimal( (args[1], args[2], 'n') )
+                return _dec_from_triple(args[1], args[2], 'n', True)
         return NaN
 
 
@@ -350,13 +350,13 @@
         if sign == 0:
             if context.rounding == ROUND_CEILING:
                 return Infsign[sign]
-            return Decimal((sign, (9,)*context.prec,
-                            context.Emax-context.prec+1))
+            return _dec_from_triple(sign, '9'*context.prec,
+                            context.Emax-context.prec+1)
         if sign == 1:
             if context.rounding == ROUND_FLOOR:
                 return Infsign[sign]
-            return Decimal( (sign, (9,)*context.prec,
-                             context.Emax-context.prec+1))
+            return _dec_from_triple(sign, '9'*context.prec,
+                             context.Emax-context.prec+1)
 
 
 class Underflow(Inexact, Rounded, Subnormal):
@@ -531,13 +531,21 @@
         Decimal("314")
         """
 
+        # Note that the coefficient, self._int, is actually stored as
+        # a string rather than as a tuple of digits.  This speeds up
+        # the "digits to integer" and "integer to digits" conversions
+        # that are used in almost every arithmetic operation on
+        # Decimals.  This is an internal detail: the as_tuple function
+        # and the Decimal constructor still deal with tuples of
+        # digits.
+
         self = object.__new__(cls)
         self._is_special = False
 
         # From an internal working value
         if isinstance(value, _WorkRep):
             self._sign = value.sign
-            self._int = tuple(map(int, str(value.int)))
+            self._int = str(value.int)
             self._exp = int(value.exp)
             return self
 
@@ -556,7 +564,7 @@
             else:
                 self._sign = 1
             self._exp = 0
-            self._int = tuple(map(int, str(abs(value))))
+            self._int = str(abs(value))
             return self
 
         # tuple/list conversion (possibly from as_tuple())
@@ -573,7 +581,7 @@
             self._sign = value[0]
             if value[2] == 'F':
                 # infinity: value[1] is ignored
-                self._int = (0,)
+                self._int = '0'
                 self._exp = value[2]
                 self._is_special = True
             else:
@@ -590,12 +598,12 @@
                                          "0 through 9.")
                 if value[2] in ('n', 'N'):
                     # NaN: digits form the diagnostic
-                    self._int = tuple(digits)
+                    self._int = ''.join(map(str, digits))
                     self._exp = value[2]
                     self._is_special = True
                 elif isinstance(value[2], int):
                     # finite number: digits give the coefficient
-                    self._int = tuple(digits or [0])
+                    self._int = ''.join(map(str, digits or [0]))
                     self._exp = value[2]
                     self._is_special = False
                 else:
@@ -608,38 +616,46 @@
             raise TypeError("Cannot convert float to Decimal.  " +
                             "First convert the float to a string")
 
-        # Other argument types may require the context during interpretation
-        if context is None:
-            context = getcontext()
-
         # From a string
         # REs insist on real strings, so we can too.
         if isinstance(value, str):
-            if _isinfinity(value):
-                self._exp = 'F'
-                self._int = (0,)
-                self._is_special = True
-                if _isinfinity(value) == 1:
-                    self._sign = 0
+            m = _parser(value)
+            if m is None:
+                if context is None:
+                    context = getcontext()
+                return context._raise_error(ConversionSyntax,
+                                "Invalid literal for Decimal: %r" % value)
+
+            if m.group('sign') == "-":
+                self._sign = 1
+            else:
+                self._sign = 0
+            intpart = m.group('int')
+            if intpart is not None:
+                # finite number
+                fracpart = m.group('frac')
+                exp = int(m.group('exp') or '0')
+                if fracpart is not None:
+                    self._int = (intpart+fracpart).lstrip('0') or '0'
+                    self._exp = exp - len(fracpart)
                 else:
-                    self._sign = 1
-                return self
-            if _isnan(value):
-                sig, sign, diag = _isnan(value)
-                self._is_special = True
-                if sig == 1:
-                    self._exp = 'n'  # qNaN
-                else:  # sig == 2
-                    self._exp = 'N'  # sNaN
-                self._sign = sign
-                self._int = tuple(map(int, diag))  # Diagnostic info
-                return self
-            try:
-                self._sign, self._int, self._exp = _string2exact(value)
-            except ValueError:
+                    self._int = intpart.lstrip('0') or '0'
+                    self._exp = exp
+                self._is_special = False
+            else:
+                diag = m.group('diag')
+                if diag is not None:
+                    # NaN
+                    self._int = diag.lstrip('0')
+                    if m.group('signal'):
+                        self._exp = 'N'
+                    else:
+                        self._exp = 'n'
+                else:
+                    # infinity
+                    self._int = '0'
+                    self._exp = 'F'
                 self._is_special = True
-                return context._raise_error(ConversionSyntax,
-                                   "Invalid literal for Decimal: %r" % value)
             return self
 
         raise TypeError("Cannot convert %r to Decimal" % value)
@@ -709,7 +725,7 @@
 
         NaNs and infinities are considered nonzero.
         """
-        return self._is_special or self._int[0] != 0
+        return self._is_special or self._int != '0'
 
     def __cmp__(self, other):
         other = _convert_other(other)
@@ -743,8 +759,8 @@
         self_adjusted = self.adjusted()
         other_adjusted = other.adjusted()
         if self_adjusted == other_adjusted:
-            self_padded = self._int + (0,)*(self._exp - other._exp)
-            other_padded = other._int + (0,)*(other._exp - self._exp)
+            self_padded = self._int + '0'*(self._exp - other._exp)
+            other_padded = other._int + '0'*(other._exp - self._exp)
             return cmp(self_padded, other_padded) * (-1)**self._sign
         elif self_adjusted > other_adjusted:
             return (-1)**self._sign
@@ -827,7 +843,7 @@
 
         To show the internals exactly as they are.
         """
-        return (self._sign, self._int, self._exp)
+        return (self._sign, tuple(map(int, self._int)), self._exp)
 
     def __repr__(self):
         """Represents the number as an instance of Decimal."""
@@ -843,10 +859,10 @@
         if self._is_special:
             if self._isnan():
                 minus = '-'*self._sign
-                if self._int == (0,):
+                if self._int == '0':
                     info = ''
                 else:
-                    info = ''.join(map(str, self._int))
+                    info = self._int
                 if self._isnan() == 2:
                     return minus + 'sNaN' + info
                 return minus + 'NaN' + info
@@ -857,7 +873,7 @@
         if context is None:
             context = getcontext()
 
-        tmp = list(map(str, self._int))
+        tmp = list(self._int)
         numdigits = len(self._int)
         leftdigits = self._exp + numdigits
         if eng and not self:  # self = 0eX wants 0[.0[0]]eY, not [[0]0]0eY
@@ -1030,7 +1046,7 @@
             sign = min(self._sign, other._sign)
             if negativezero:
                 sign = 1
-            ans = Decimal( (sign, (0,), exp))
+            ans = _dec_from_triple(sign, '0', exp)
             if shouldround:
                 ans = ans._fix(context)
             return ans
@@ -1055,7 +1071,7 @@
         if op1.sign != op2.sign:
             # Equal and opposite
             if op1.int == op2.int:
-                ans = Decimal((negativezero, (0,), exp))
+                ans = _dec_from_triple(negativezero, '0', exp)
                 if shouldround:
                     ans = ans._fix(context)
                 return ans
@@ -1121,7 +1137,7 @@
         For example:
         Decimal('5.624e10')._increment() == Decimal('5.625e10')
         """
-        L = list(self._int)
+        L = list(map(int, self._int))
         L[-1] += 1
         spot = len(L)-1
         while L[spot] == 10:
@@ -1131,7 +1147,7 @@
                 break
             L[spot-1] += 1
             spot -= 1
-        return Decimal((self._sign, L, self._exp))
+        return _dec_from_triple(self._sign, "".join(map(str, L)), self._exp)
 
     def __mul__(self, other, context=None):
         """Return self * other.
@@ -1167,20 +1183,20 @@
 
         # Special case for multiplying by zero
         if not self or not other:
-            ans = Decimal((resultsign, (0,), resultexp))
+            ans = _dec_from_triple(resultsign, '0', resultexp)
             if shouldround:
                 # Fixing in case the exponent is out of bounds
                 ans = ans._fix(context)
             return ans
 
         # Special case for multiplying by power of 10
-        if self._int == (1,):
-            ans = Decimal((resultsign, other._int, resultexp))
+        if self._int == '1':
+            ans = _dec_from_triple(resultsign, other._int, resultexp)
             if shouldround:
                 ans = ans._fix(context)
             return ans
-        if other._int == (1,):
-            ans = Decimal((resultsign, self._int, resultexp))
+        if other._int == '1':
+            ans = _dec_from_triple(resultsign, self._int, resultexp)
             if shouldround:
                 ans = ans._fix(context)
             return ans
@@ -1188,9 +1204,7 @@
         op1 = _WorkRep(self)
         op2 = _WorkRep(other)
 
-        ans = Decimal((resultsign,
-                       tuple(map(int, str(op1.int * op2.int))),
-                       resultexp))
+        ans = _dec_from_triple(resultsign, str(op1.int * op2.int), resultexp)
         if shouldround:
             ans = ans._fix(context)
 
@@ -1221,7 +1235,7 @@
 
             if other._isinfinity():
                 context._raise_error(Clamped, 'Division by infinity')
-                return Decimal((sign, (0,), context.Etiny()))
+                return _dec_from_triple(sign, '0', context.Etiny())
 
         # Special cases for zeroes
         if not other:
@@ -1253,7 +1267,7 @@
                     coeff //= 10
                     exp += 1
 
-        ans = Decimal((sign, list(map(int, str(coeff))), exp))
+        ans = _dec_from_triple(sign, str(coeff), exp)
         return ans._fix(context)
 
     def _divide(self, other, context):
@@ -1270,7 +1284,7 @@
 
         expdiff = self.adjusted() - other.adjusted()
         if not self or other._isinfinity() or expdiff <= -2:
-            return (Decimal((sign, (0,), 0)),
+            return (_dec_from_triple(sign, '0', 0),
                     self._rescale(ideal_exp, context.rounding))
         if expdiff <= context.prec:
             op1 = _WorkRep(self)
@@ -1281,9 +1295,8 @@
                 op2.int *= 10**(op2.exp - op1.exp)
             q, r = divmod(op1.int, op2.int)
             if q < 10**context.prec:
-                return (Decimal((sign, list(map(int, str(q))), 0)),
-                        Decimal((self._sign, list(map(int, str(r))),
-                                ideal_exp)))
+                return (_dec_from_triple(sign, str(q), 0),
+                        _dec_from_triple(self._sign, str(r), ideal_exp))
 
         # Here the quotient is too large to be representable
         ans = context._raise_error(DivisionImpossible,
@@ -1411,7 +1424,7 @@
         # self = 0 -> remainder = self, with ideal exponent
         ideal_exponent = min(self._exp, other._exp)
         if not self:
-            ans = Decimal((self._sign, (0,), ideal_exponent))
+            ans = _dec_from_triple(self._sign, '0', ideal_exponent)
             return ans._fix(context)
 
         # catch most cases of large or small quotient
@@ -1448,7 +1461,7 @@
             sign = 1-sign
             r = -r
 
-        ans = Decimal((sign, list(map(int, str(r))), ideal_exponent))
+        ans = _dec_from_triple(sign, str(r), ideal_exponent)
         return ans._fix(context)
 
     def __floordiv__(self, other, context=None):
@@ -1500,9 +1513,9 @@
                 raise OverflowError("Cannot convert infinity to int")
         s = (-1)**self._sign
         if self._exp >= 0:
-            return s*int(''.join(map(str, self._int)))*10**self._exp
+            return s*int(self._int)*10**self._exp
         else:
-            return s*int(''.join(map(str, self._int))[:self._exp] or '0')
+            return s*int(self._int[:self._exp] or '0')
 
     def _fix_nan(self, context):
         """Decapitate the payload of a NaN to fit the context"""
@@ -1512,11 +1525,8 @@
         # precision-1 if _clamp=1.
         max_payload_len = context.prec - context._clamp
         if len(payload) > max_payload_len:
-            pos = len(payload)-max_payload_len
-            while pos < len(payload) and payload[pos] == 0:
-                pos += 1
-            payload = payload[pos:]
-            return Decimal((self._sign, payload, self._exp))
+            payload = payload[len(payload)-max_payload_len:].lstrip('0')
+            return _dec_from_triple(self._sign, payload, self._exp, True)
         return Decimal(self)
 
     def _fix(self, context):
@@ -1549,7 +1559,7 @@
             new_exp = min(max(self._exp, Etiny), exp_max)
             if new_exp != self._exp:
                 context._raise_error(Clamped)
-                return Decimal((self._sign, (0,), new_exp))
+                return _dec_from_triple(self._sign, '0', new_exp)
             else:
                 return Decimal(self)
 
@@ -1581,7 +1591,8 @@
                     # we get here only if rescaling rounds the
                     # cofficient up to exactly 10**context.prec
                     if ans._exp < Etop:
-                        ans = Decimal((ans._sign, ans._int[:-1], ans._exp+1))
+                        ans = _dec_from_triple(ans._sign,
+                                                   ans._int[:-1], ans._exp+1)
                     else:
                         # Inexact and Rounded have already been raised
                         ans = context._raise_error(Overflow, 'above Emax',
@@ -1591,8 +1602,8 @@
         # fold down if _clamp == 1 and self has too few digits
         if context._clamp == 1 and self._exp > Etop:
             context._raise_error(Clamped)
-            self_padded = self._int + (0,)*(self._exp - Etop)
-            return Decimal((self._sign, self_padded, Etop))
+            self_padded = self._int + '0'*(self._exp - Etop)
+            return _dec_from_triple(self._sign, self_padded, Etop)
 
         # here self was representable to begin with; return unchanged
         return Decimal(self)
@@ -1607,29 +1618,29 @@
     def _round_down(self, prec):
         """Also known as round-towards-0, truncate."""
         newexp = self._exp + len(self._int) - prec
-        return Decimal((self._sign, self._int[:prec] or (0,), newexp))
+        return _dec_from_triple(self._sign, self._int[:prec] or '0', newexp)
 
     def _round_up(self, prec):
         """Rounds away from 0."""
         newexp = self._exp + len(self._int) - prec
-        tmp = Decimal((self._sign, self._int[:prec] or (0,), newexp))
+        tmp = _dec_from_triple(self._sign, self._int[:prec] or '0', newexp)
         for digit in self._int[prec:]:
-            if digit != 0:
+            if digit != '0':
                 return tmp._increment()
         return tmp
 
     def _round_half_up(self, prec):
         """Rounds 5 up (away from 0)"""
-        if self._int[prec] >= 5:
+        if self._int[prec] in '56789':
             return self._round_up(prec)
         else:
             return self._round_down(prec)
 
     def _round_half_down(self, prec):
         """Round 5 down"""
-        if self._int[prec] == 5:
+        if self._int[prec] == '5':
             for digit in self._int[prec+1:]:
-                if digit != 0:
+                if digit != '0':
                     break
             else:
                 return self._round_down(prec)
@@ -1637,7 +1648,7 @@
 
     def _round_half_even(self, prec):
         """Round 5 to even, rest to nearest."""
-        if prec and self._int[prec-1] & 1:
+        if prec and self._int[prec-1] in '13579':
             return self._round_half_up(prec)
         else:
             return self._round_half_down(prec)
@@ -1658,7 +1669,7 @@
 
     def _round_05up(self, prec):
         """Round down unless digit prec-1 is 0 or 5."""
-        if prec == 0 or self._int[prec-1] in (0, 5):
+        if prec == 0 or self._int[prec-1] in '05':
             return self._round_up(prec)
         else:
             return self._round_down(prec)
@@ -1776,7 +1787,7 @@
             base = pow(base, 10, modulo)
         base = pow(base, exponent.int, modulo)
 
-        return Decimal((sign, list(map(int, str(base))), 0))
+        return _dec_from_triple(sign, str(base), 0)
 
     def _power_exact(self, other, p):
         """Attempt to compute self**other exactly.
@@ -1866,7 +1877,7 @@
                 zeros = min(exponent-ideal_exponent, p-1)
             else:
                 zeros = 0
-            return Decimal((0, (1,) + (0,)*zeros, exponent-zeros))
+            return _dec_from_triple(0, '1' + '0'*zeros, exponent-zeros)
 
         # case where y is negative: xc must be either a power
         # of 2 or a power of 5.
@@ -1927,7 +1938,7 @@
             if xc >= 10**p:
                 return None
             xe = -e-xe
-            return Decimal((0, list(map(int, str(xc))), xe))
+            return _dec_from_triple(0, str(xc), xe)
 
         # now y is positive; find m and n such that y = m/n
         if ye >= 0:
@@ -1989,7 +2000,7 @@
             zeros = min(xe-ideal_exponent, p-len(str_xc))
         else:
             zeros = 0
-        return Decimal((0, list(map(int, str_xc))+[0,]*zeros, xe-zeros))
+        return _dec_from_triple(0, str_xc+'0'*zeros, xe-zeros)
 
     def __pow__(self, other, modulo=None, context=None):
         """Return self ** other [ % modulo].
@@ -2050,12 +2061,12 @@
                     return context._raise_error(InvalidOperation,
                         'x ** y with x negative and y not an integer')
             # negate self, without doing any unwanted rounding
-            self = Decimal((0, self._int, self._exp))
+            self = self.copy_negate()
 
         # 0**(+ve or Inf)= 0; 0**(-ve or -Inf) = Infinity
         if not self:
             if other._sign == 0:
-                return Decimal((result_sign, (0,), 0))
+                return _dec_from_triple(result_sign, '0', 0)
             else:
                 return Infsign[result_sign]
 
@@ -2064,7 +2075,7 @@
             if other._sign == 0:
                 return Infsign[result_sign]
             else:
-                return Decimal((result_sign, (0,), 0))
+                return _dec_from_triple(result_sign, '0', 0)
 
         # 1**other = 1, but the choice of exponent and the flags
         # depend on the exponent of self, and on whether other is a
@@ -2091,7 +2102,7 @@
                 context._raise_error(Rounded)
                 exp = 1-context.prec
 
-            return Decimal((result_sign, (1,)+(0,)*-exp, exp))
+            return _dec_from_triple(result_sign, '1'+'0'*-exp, exp)
 
         # compute adjusted exponent of self
         self_adj = self.adjusted()
@@ -2100,7 +2111,7 @@
         # self ** -infinity is infinity if self < 1, 0 if self > 1
         if other._isinfinity():
             if (other._sign == 0) == (self_adj < 0):
-                return Decimal((result_sign, (0,), 0))
+                return _dec_from_triple(result_sign, '0', 0)
             else:
                 return Infsign[result_sign]
 
@@ -2118,19 +2129,19 @@
             # self > 1 and other +ve, or self < 1 and other -ve
             # possibility of overflow
             if bound >= len(str(context.Emax)):
-                ans = Decimal((result_sign, (1,), context.Emax+1))
+                ans = _dec_from_triple(result_sign, '1', context.Emax+1)
         else:
             # self > 1 and other -ve, or self < 1 and other +ve
             # possibility of underflow to 0
             Etiny = context.Etiny()
             if bound >= len(str(-Etiny)):
-                ans = Decimal((result_sign, (1,), Etiny-1))
+                ans = _dec_from_triple(result_sign, '1', Etiny-1)
 
         # try for an exact result with precision +1
         if ans is None:
             ans = self._power_exact(other, context.prec + 1)
             if ans is not None and result_sign == 1:
-                ans = Decimal((1, ans._int, ans._exp))
+                ans = _dec_from_triple(1, ans._int, ans._exp)
 
         # usual case: inexact result, x**y computed directly as exp(y*log(x))
         if ans is None:
@@ -2151,7 +2162,7 @@
                     break
                 extra += 3
 
-            ans = Decimal((result_sign, list(map(int, str(coeff))), exp))
+            ans = _dec_from_triple(result_sign, str(coeff), exp)
 
         # the specification says that for non-integer other we need to
         # raise Inexact, even when the result is actually exact.  In
@@ -2163,7 +2174,8 @@
             # pad with zeros up to length context.prec+1 if necessary
             if len(ans._int) <= context.prec:
                 expdiff = context.prec+1 - len(ans._int)
-                ans = Decimal((ans._sign, ans._int+(0,)*expdiff, ans._exp-expdiff))
+                ans = _dec_from_triple(ans._sign, ans._int+'0'*expdiff,
+                                       ans._exp-expdiff)
             if ans.adjusted() < context.Emin:
                 context._raise_error(Underflow)
 
@@ -2195,14 +2207,14 @@
             return dup
 
         if not dup:
-            return Decimal( (dup._sign, (0,), 0) )
+            return _dec_from_triple(dup._sign, '0', 0)
         exp_max = [context.Emax, context.Etop()][context._clamp]
         end = len(dup._int)
         exp = dup._exp
-        while dup._int[end-1] == 0 and exp < exp_max:
+        while dup._int[end-1] == '0' and exp < exp_max:
             exp += 1
             end -= 1
-        return Decimal( (dup._sign, dup._int[:end], exp) )
+        return _dec_from_triple(dup._sign, dup._int[:end], exp)
 
     def quantize(self, exp, rounding=None, context=None, watchexp=True):
         """Quantize self so its exponent is the same as that of exp.
@@ -2243,7 +2255,7 @@
                    'target exponent out of bounds in quantize')
 
         if not self:
-            ans = Decimal((self._sign, (0,), exp._exp))
+            ans = _dec_from_triple(self._sign, '0', exp._exp)
             return ans._fix(context)
 
         self_adjusted = self.adjusted()
@@ -2303,17 +2315,18 @@
         if self._is_special:
             return Decimal(self)
         if not self:
-            return Decimal((self._sign, (0,), exp))
+            return _dec_from_triple(self._sign, '0', exp)
 
         if self._exp >= exp:
             # pad answer with zeros if necessary
-            return Decimal((self._sign, self._int + (0,)*(self._exp - exp), exp))
+            return _dec_from_triple(self._sign,
+                                        self._int + '0'*(self._exp - exp), exp)
 
         # too many digits; round and lose data.  If self.adjusted() <
         # exp-1, replace self by 10**(exp-1) before rounding
         digits = len(self._int) + self._exp - exp
         if digits < 0:
-            self = Decimal((self._sign, (1,), exp-1))
+            self = _dec_from_triple(self._sign, '1', exp-1)
             digits = 0
         this_function = getattr(self, self._pick_rounding_function[rounding])
         return this_function(digits)
@@ -2336,7 +2349,7 @@
         if self._exp >= 0:
             return Decimal(self)
         if not self:
-            return Decimal((self._sign, (0,), 0))
+            return _dec_from_triple(self._sign, '0', 0)
         if context is None:
             context = getcontext()
         if rounding is None:
@@ -2378,7 +2391,7 @@
 
         if not self:
             # exponent = self._exp // 2.  sqrt(-0) = -0
-            ans = Decimal((self._sign, (0,), self._exp // 2))
+            ans = _dec_from_triple(self._sign, '0', self._exp // 2)
             return ans._fix(context)
 
         if context is None:
@@ -2455,7 +2468,7 @@
             if n % 5 == 0:
                 n += 1
 
-        ans = Decimal((0, list(map(int, str(n))), e))
+        ans = _dec_from_triple(0, str(n), e)
 
         # round, and fit to current context
         context = context._shallow_copy()
@@ -2552,13 +2565,13 @@
         if self._exp >= 0:
             return True
         rest = self._int[self._exp:]
-        return rest == (0,)*len(rest)
+        return rest == '0'*len(rest)
 
     def _iseven(self):
         """Returns True if self is even.  Assumes self is an integer."""
         if not self or self._exp > 0:
             return True
-        return self._int[-1+self._exp] & 1 == 0
+        return self._int[-1+self._exp] in '02468'
 
     def adjusted(self):
         """Return the adjusted exponent of self"""
@@ -2680,18 +2693,19 @@
 
     def copy_abs(self):
         """Returns a copy with the sign set to 0. """
-        return Decimal((0, self._int, self._exp))
+        return _dec_from_triple(0, self._int, self._exp, self._is_special)
 
     def copy_negate(self):
         """Returns a copy with the sign inverted."""
         if self._sign:
-            return Decimal((0, self._int, self._exp))
+            return _dec_from_triple(0, self._int, self._exp, self._is_special)
         else:
-            return Decimal((1, self._int, self._exp))
+            return _dec_from_triple(1, self._int, self._exp, self._is_special)
 
     def copy_sign(self, other):
         """Returns self with the sign of other."""
-        return Decimal((other._sign, self._int, self._exp))
+        return _dec_from_triple(other._sign, self._int,
+                                self._exp, self._is_special)
 
     def exp(self, context=None):
         """Returns e ** self."""
@@ -2730,16 +2744,16 @@
         # larger exponent the result either overflows or underflows.
         if self._sign == 0 and adj > len(str((context.Emax+1)*3)):
             # overflow
-            ans = Decimal((0, (1,), context.Emax+1))
+            ans = _dec_from_triple(0, '1', context.Emax+1)
         elif self._sign == 1 and adj > len(str((-context.Etiny()+1)*3)):
             # underflow to 0
-            ans = Decimal((0, (1,), context.Etiny()-1))
+            ans = _dec_from_triple(0, '1', context.Etiny()-1)
         elif self._sign == 0 and adj < -p:
             # p+1 digits; final round will raise correct flags
-            ans = Decimal((0, (1,) + (0,)*(p-1) + (1,), -p))
+            ans = _dec_from_triple(0, '1' + '0'*(p-1) + '1', -p)
         elif self._sign == 1 and adj < -p-1:
             # p+1 digits; final round will raise correct flags
-            ans = Decimal((0, (9,)*(p+1), -p-1))
+            ans = _dec_from_triple(0, '9'*(p+1), -p-1)
         # general case
         else:
             op = _WorkRep(self)
@@ -2757,7 +2771,7 @@
                     break
                 extra += 3
 
-            ans = Decimal((0, list(map(int, str(coeff))), exp))
+            ans = _dec_from_triple(0, str(coeff), exp)
 
         # at this stage, ans should round correctly with *any*
         # rounding mode, not just with ROUND_HALF_EVEN
@@ -2822,7 +2836,7 @@
 
     def is_zero(self):
         """Return True if self is a zero; otherwise return False."""
-        return not self._is_special and self._int[0] == 0
+        return not self._is_special and self._int == '0'
 
     def _ln_exp_bound(self):
         """Compute a lower bound for the adjusted exponent of self.ln().
@@ -2891,7 +2905,7 @@
             if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
                 break
             places += 3
-        ans = Decimal((int(coeff<0), list(map(int, str(abs(coeff)))), -places))
+        ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
 
         context = context._shallow_copy()
         rounding = context._set_rounding(ROUND_HALF_EVEN)
@@ -2954,7 +2968,7 @@
                                         'log10 of a negative value')
 
         # log10(10**n) = n
-        if self._int[0] == 1 and self._int[1:] == (0,)*(len(self._int) - 1):
+        if self._int[0] == '1' and self._int[1:] == '0'*(len(self._int) - 1):
             # answer may need rounding
             ans = Decimal(self._exp + len(self._int) - 1)
         else:
@@ -2972,8 +2986,7 @@
                 if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
                     break
                 places += 3
-            ans = Decimal((int(coeff<0), list(map(int, str(abs(coeff)))),
-                          -places))
+            ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
 
         context = context._shallow_copy()
         rounding = context._set_rounding(ROUND_HALF_EVEN)
@@ -3020,19 +3033,19 @@
         if self._sign != 0 or self._exp != 0:
             return False
         for dig in self._int:
-            if dig not in (0, 1):
+            if dig not in '01':
                 return False
         return True
 
     def _fill_logical(self, context, opa, opb):
         dif = context.prec - len(opa)
         if dif > 0:
-            opa = (0,)*dif + opa
+            opa = '0'*dif + opa
         elif dif < 0:
             opa = opa[-context.prec:]
         dif = context.prec - len(opb)
         if dif > 0:
-            opb = (0,)*dif + opb
+            opb = '0'*dif + opb
         elif dif < 0:
             opb = opb[-context.prec:]
         return opa, opb
@@ -3048,22 +3061,15 @@
         (opa, opb) = self._fill_logical(context, self._int, other._int)
 
         # make the operation, and clean starting zeroes
-        result = [a&b for a,b in zip(opa,opb)]
-        for i,d in enumerate(result):
-            if d == 1:
-                break
-        result = tuple(result[i:])
-
-        # if empty, we must have at least a zero
-        if not result:
-            result = (0,)
-        return Decimal((0, result, 0))
+        result = "".join([str(int(a)&int(b)) for a,b in zip(opa,opb)])
+        return _dec_from_triple(0, result.lstrip('0') or '0', 0)
 
     def logical_invert(self, context=None):
         """Invert all its digits."""
         if context is None:
             context = getcontext()
-        return self.logical_xor(Decimal((0,(1,)*context.prec,0)), context)
+        return self.logical_xor(_dec_from_triple(0,'1'*context.prec,0),
+                                context)
 
     def logical_or(self, other, context=None):
         """Applies an 'or' operation between self and other's digits."""
@@ -3076,16 +3082,8 @@
         (opa, opb) = self._fill_logical(context, self._int, other._int)
 
         # make the operation, and clean starting zeroes
-        result = [a|b for a,b in zip(opa,opb)]
-        for i,d in enumerate(result):
-            if d == 1:
-                break
-        result = tuple(result[i:])
-
-        # if empty, we must have at least a zero
-        if not result:
-            result = (0,)
-        return Decimal((0, result, 0))
+        result = "".join(str(int(a)|int(b)) for a,b in zip(opa,opb))
+        return _dec_from_triple(0, result.lstrip('0') or '0', 0)
 
     def logical_xor(self, other, context=None):
         """Applies an 'xor' operation between self and other's digits."""
@@ -3098,16 +3096,8 @@
         (opa, opb) = self._fill_logical(context, self._int, other._int)
 
         # make the operation, and clean starting zeroes
-        result = [a^b for a,b in zip(opa,opb)]
-        for i,d in enumerate(result):
-            if d == 1:
-                break
-        result = tuple(result[i:])
-
-        # if empty, we must have at least a zero
-        if not result:
-            result = (0,)
-        return Decimal((0, result, 0))
+        result = "".join(str(int(a)^int(b)) for a,b in zip(opa,opb))
+        return _dec_from_triple(0, result.lstrip('0') or '0', 0)
 
     def max_mag(self, other, context=None):
         """Compares the values numerically with their sign ignored."""
@@ -3185,7 +3175,7 @@
         if self._isinfinity() == -1:
             return negInf
         if self._isinfinity() == 1:
-            return Decimal((0, (9,)*context.prec, context.Etop()))
+            return _dec_from_triple(0, '9'*context.prec, context.Etop())
 
         context = context.copy()
         context._set_rounding(ROUND_FLOOR)
@@ -3193,7 +3183,8 @@
         new_self = self._fix(context)
         if new_self != self:
             return new_self
-        return self.__sub__(Decimal((0, (1,), context.Etiny()-1)), context)
+        return self.__sub__(_dec_from_triple(0, '1', context.Etiny()-1),
+                            context)
 
     def next_plus(self, context=None):
         """Returns the smallest representable number larger than itself."""
@@ -3207,7 +3198,7 @@
         if self._isinfinity() == 1:
             return Inf
         if self._isinfinity() == -1:
-            return Decimal((1, (9,)*context.prec, context.Etop()))
+            return _dec_from_triple(1, '9'*context.prec, context.Etop())
 
         context = context.copy()
         context._set_rounding(ROUND_CEILING)
@@ -3215,7 +3206,8 @@
         new_self = self._fix(context)
         if new_self != self:
             return new_self
-        return self.__add__(Decimal((0, (1,), context.Etiny()-1)), context)
+        return self.__add__(_dec_from_triple(0, '1', context.Etiny()-1),
+                            context)
 
     def next_toward(self, other, context=None):
         """Returns the number closest to self, in the direction towards other.
@@ -3237,7 +3229,7 @@
 
         comparison = self.__cmp__(other)
         if comparison == 0:
-            return Decimal((other._sign, self._int, self._exp))
+            return self.copy_sign(other)
 
         if comparison == -1:
             ans = self.next_plus(context)
@@ -3331,19 +3323,12 @@
         rotdig = self._int
         topad = context.prec - len(rotdig)
         if topad:
-            rotdig = ((0,)*topad) + rotdig
+            rotdig = '0'*topad + rotdig
 
         # let's rotate!
         rotated = rotdig[torot:] + rotdig[:torot]
-
-        # clean starting zeroes
-        for i,d in enumerate(rotated):
-            if d != 0:
-                break
-        rotated = rotated[i:]
-
-        return Decimal((self._sign, rotated, self._exp))
-
+        return _dec_from_triple(self._sign,
+                                rotated.lstrip('0') or '0', self._exp)
 
     def scaleb (self, other, context=None):
         """Returns self operand after adding the second value to its exp."""
@@ -3364,7 +3349,7 @@
         if self._isinfinity():
             return Decimal(self)
 
-        d = Decimal((self._sign, self._int, self._exp + int(other)))
+        d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
         d = d._fix(context)
         return d
 
@@ -3392,26 +3377,17 @@
         rotdig = self._int
         topad = context.prec - len(rotdig)
         if topad:
-            rotdig = ((0,)*topad) + rotdig
+            rotdig = '0'*topad + rotdig
 
         # let's shift!
         if torot < 0:
             rotated = rotdig[:torot]
         else:
-            rotated = (rotdig + ((0,) * torot))
+            rotated = rotdig + '0'*torot
             rotated = rotated[-context.prec:]
 
-        # clean starting zeroes
-        if rotated:
-            for i,d in enumerate(rotated):
-                if d != 0:
-                    break
-            rotated = rotated[i:]
-        else:
-            rotated = (0,)
-
-        return Decimal((self._sign, rotated, self._exp))
-
+        return _dec_from_triple(self._sign,
+                                    rotated.lstrip('0') or '0', self._exp)
 
     # Support for pickling, copy, and deepcopy
     def __reduce__(self):
@@ -3427,6 +3403,22 @@
             return self     # My components are also immutable
         return self.__class__(str(self))
 
+def _dec_from_triple(sign, coefficient, exponent, special=False):
+    """Create a decimal instance directly, without any validation,
+    normalization (e.g. removal of leading zeros) or argument
+    conversion.
+
+    This function is for *internal use only*.
+    """
+
+    self = object.__new__(Decimal)
+    self._sign = sign
+    self._int = coefficient
+    self._exp = exponent
+    self._is_special = special
+
+    return self
+
 ##### Context class #######################################################
 
 
@@ -4775,10 +4767,7 @@
             self.exp = None
         elif isinstance(value, Decimal):
             self.sign = value._sign
-            cum = 0
-            for digit  in value._int:
-                cum = cum * 10 + digit
-            self.int = cum
+            self.int = int(value._int)
             self.exp = value._exp
         else:
             # assert isinstance(value, tuple)
@@ -5175,53 +5164,6 @@
         raise TypeError("Unable to convert %s to Decimal" % other)
     return NotImplemented
 
-_infinity_map = {
-    'inf' : 1,
-    'infinity' : 1,
-    '+inf' : 1,
-    '+infinity' : 1,
-    '-inf' : -1,
-    '-infinity' : -1
-}
-
-def _isinfinity(num):
-    """Determines whether a string or float is infinity.
-
-    +1 for negative infinity; 0 for finite ; +1 for positive infinity
-    """
-    num = str(num).lower()
-    return _infinity_map.get(num, 0)
-
-def _isnan(num):
-    """Determines whether a string or float is NaN
-
-    (1, sign, diagnostic info as string) => NaN
-    (2, sign, diagnostic info as string) => sNaN
-    0 => not a NaN
-    """
-    num = str(num).lower()
-    if not num:
-        return 0
-
-    # Get the sign, get rid of trailing [+-]
-    sign = 0
-    if num[0] == '+':
-        num = num[1:]
-    elif num[0] == '-':  # elif avoids '+-nan'
-        num = num[1:]
-        sign = 1
-
-    if num.startswith('nan'):
-        if len(num) > 3 and not num[3:].isdigit():  # diagnostic info
-            return 0
-        return (1, sign, num[3:].lstrip('0'))
-    if num.startswith('snan'):
-        if len(num) > 4 and not num[4:].isdigit():
-            return 0
-        return (2, sign, num[4:].lstrip('0'))
-    return 0
-
-
 ##### Setup Specific Contexts ############################################
 
 # The default context prototype used by Context()
@@ -5255,91 +5197,62 @@
 )
 
 
-##### Useful Constants (internal use only) ################################
-
-# Reusable defaults
-Inf = Decimal('Inf')
-negInf = Decimal('-Inf')
-NaN = Decimal('NaN')
-Dec_0 = Decimal(0)
-Dec_p1 = Decimal(1)
-Dec_n1 = Decimal(-1)
-Dec_p2 = Decimal(2)
-Dec_n2 = Decimal(-2)
-
-# Infsign[sign] is infinity w/ that sign
-Infsign = (Inf, negInf)
-
-
 ##### crud for parsing strings #############################################
 import re
 
-# There's an optional sign at the start, and an optional exponent
-# at the end.  The exponent has an optional sign and at least one
-# digit.  In between, must have either at least one digit followed
-# by an optional fraction, or a decimal point followed by at least
-# one digit.  Yuck.
+# Regular expression used for parsing numeric strings.  Additional
+# comments:
+#
+# 1. Uncomment the two '\s*' lines to allow leading and/or trailing
+# whitespace.  But note that the specification disallows whitespace in
+# a numeric string.
+#
+# 2. For finite numbers (not infinities and NaNs) the body of the
+# number between the optional sign and the optional exponent must have
+# at least one decimal digit, possibly after the decimal point.  The
+# lookahead expression '(?=\d|\.\d)' checks this.
+#
+# As the flag UNICODE is not enabled here, we're explicitly avoiding any
+# other meaning for \d than the numbers [0-9].
 
-_parser = re.compile(r"""
+import re
+_parser = re.compile(r"""     # A numeric string consists of:
 #    \s*
-    (?P<sign>[-+])?
+    (?P<sign>[-+])?           # an optional sign, followed by either...
     (
-        (?P<int>\d+) (\. (?P<frac>\d*))?
+        (?=\d|\.\d)           # ...a number (with at least one digit)
+        (?P<int>\d*)          # consisting of a (possibly empty) integer part
+        (\.(?P<frac>\d*))?    # followed by an optional fractional part
+        (E(?P<exp>[-+]?\d+))? # followed by an optional exponent, or...
+    |
+        Inf(inity)?           # ...an infinity, or...
     |
-        \. (?P<onlyfrac>\d+)
+        (?P<signal>s)?        # ...an (optionally signaling)
+        NaN                   # NaN
+        (?P<diag>\d*)         # with (possibly empty) diagnostic information.
     )
-    ([eE](?P<exp>[-+]? \d+))?
 #    \s*
     $
-""", re.VERBOSE).match  # Uncomment the \s* to allow leading or trailing spaces.
+""", re.VERBOSE | re.IGNORECASE).match
 
 del re
 
-def _string2exact(s):
-    """Return sign, n, p s.t.
-
-    Float string value == -1**sign * n * 10**p exactly
-    """
-    m = _parser(s)
-    if m is None:
-        raise ValueError("invalid literal for Decimal: %r" % s)
 
-    if m.group('sign') == "-":
-        sign = 1
-    else:
-        sign = 0
+##### Useful Constants (internal use only) ################################
 
-    exp = m.group('exp')
-    if exp is None:
-        exp = 0
-    else:
-        exp = int(exp)
+# Reusable defaults
+Inf = Decimal('Inf')
+negInf = Decimal('-Inf')
+NaN = Decimal('NaN')
+Dec_0 = Decimal(0)
+Dec_p1 = Decimal(1)
+Dec_n1 = Decimal(-1)
+Dec_p2 = Decimal(2)
+Dec_n2 = Decimal(-2)
 
-    intpart = m.group('int')
-    if intpart is None:
-        intpart = ""
-        fracpart = m.group('onlyfrac')
-    else:
-        fracpart = m.group('frac')
-        if fracpart is None:
-            fracpart = ""
-
-    exp -= len(fracpart)
-
-    mantissa = intpart + fracpart
-    tmp = list(map(int, mantissa))
-    backup = tmp
-    while tmp and tmp[0] == 0:
-        del tmp[0]
-
-    # It's a zero
-    if not tmp:
-        if backup:
-            return (sign, tuple(backup), exp)
-        return (sign, (0,), exp)
-    mantissa = tuple(tmp)
+# Infsign[sign] is infinity w/ that sign
+Infsign = (Inf, negInf)
 
-    return (sign, mantissa, exp)
 
 
 if __name__ == '__main__':

Modified: python/branches/py3k/Lib/doctest.py
==============================================================================
--- python/branches/py3k/Lib/doctest.py	(original)
+++ python/branches/py3k/Lib/doctest.py	Tue Nov 27 00:23:18 2007
@@ -315,8 +315,21 @@
     """
     def __init__(self, out):
         self.__out = out
+        self.__debugger_used = False
         pdb.Pdb.__init__(self, stdout=out)
 
+    def set_trace(self, frame=None):
+        self.__debugger_used = True
+        if frame is None:
+            frame = sys._getframe().f_back
+        pdb.Pdb.set_trace(self, frame)
+
+    def set_continue(self):
+        # Calling set_continue unconditionally would break unit test
+        # coverage reporting, as Bdb.set_continue calls sys.settrace(None).
+        if self.__debugger_used:
+            pdb.Pdb.set_continue(self)
+
     def trace_dispatch(self, *args):
         # Redirect stdout to the given stream.
         save_stdout = sys.stdout

Modified: python/branches/py3k/Lib/test/decimaltestdata/abs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/abs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/abs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests primarily tests the existence of the operator.
 -- Additon, subtraction, rounding, and more overflows are tested

Modified: python/branches/py3k/Lib/test/decimaltestdata/add.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/add.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/add.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   9
 rounding:    half_up
@@ -1122,6 +1122,15 @@
 addx1117 add -1e-4 +1e-383   -> -0.00009999999999999999  Rounded Inexact
 addx1118 add -1e-5 +1e-383   -> -0.000009999999999999999  Rounded Inexact
 addx1119 add -1e-6 +1e-383   -> -9.999999999999999E-7  Rounded Inexact
+addx1120 add +1e-383 -1e+2   -> -99.99999999999999 Rounded Inexact
+addx1121 add +1e-383 -1e+1   -> -9.999999999999999  Rounded Inexact
+addx1123 add +1e-383    -1   -> -0.9999999999999999  Rounded Inexact
+addx1124 add +1e-383 -1e-1   -> -0.09999999999999999  Rounded Inexact
+addx1125 add +1e-383 -1e-2   -> -0.009999999999999999  Rounded Inexact
+addx1126 add +1e-383 -1e-3   -> -0.0009999999999999999  Rounded Inexact
+addx1127 add +1e-383 -1e-4   -> -0.00009999999999999999  Rounded Inexact
+addx1128 add +1e-383 -1e-5   -> -0.000009999999999999999  Rounded Inexact
+addx1129 add +1e-383 -1e-6   -> -9.999999999999999E-7  Rounded Inexact
 
 rounding:     down
 precision:    7
@@ -1658,17 +1667,19 @@
 addx6057 add '1E+2' '1E+4' -> '1.01E+4'
 
 -- from above
-addx6061 add 1 '0.1' -> '1.1'
-addx6062 add 1 '0.01' -> '1.01'
-addx6063 add 1 '0.001' -> '1.001'
-addx6064 add 1 '0.0001' -> '1.0001'
-addx6065 add 1 '0.00001' -> '1.00001'
-addx6066 add 1 '0.000001' -> '1.000001'
-addx6067 add 1 '0.0000001' -> '1.0000001'
-addx6068 add 1 '0.00000001' -> '1.00000001'
+addx6060 add 1 '0.1' -> '1.1'
+addx6061 add 1 '0.01' -> '1.01'
+addx6062 add 1 '0.001' -> '1.001'
+addx6063 add 1 '0.0001' -> '1.0001'
+addx6064 add 1 '0.00001' -> '1.00001'
+addx6065 add 1 '0.000001' -> '1.000001'
+addx6066 add 1 '0.0000001' -> '1.0000001'
+addx6067 add 1 '0.00000001' -> '1.00000001'
 
 -- cancellation to integer
-addx6069 add 99999999999999123456789 -99999999999999E+9 -> 123456789
+addx6068 add 99999999999999123456789 -99999999999999E+9 -> 123456789
+-- similar from FMA fun
+addx6069 add "-1234567890123455.234567890123454" "1234567890123456" -> 0.765432109876546
 
 -- some funny zeros [in case of bad signum]
 addx6070 add 1  0    -> 1

Modified: python/branches/py3k/Lib/test/decimaltestdata/and.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/and.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/and.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/base.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/base.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/base.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 extended:    1
 
 -- This file tests base conversions from string to a decimal number

Modified: python/branches/py3k/Lib/test/decimaltestdata/clamp.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/clamp.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/clamp.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests uses the same limits as the 8-byte concrete
 -- representation, but applies clamping without using format-specific

Modified: python/branches/py3k/Lib/test/decimaltestdata/class.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/class.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/class.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- [New 2006.11.27]
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/compare.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/compare.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/compare.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/comparetotal.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/comparetotal.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/comparetotal.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/comparetotmag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/comparetotmag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/comparetotmag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that it cannot be assumed that add/subtract tests cover paths
 -- for this operation adequately, here, because the code might be

Modified: python/branches/py3k/Lib/test/decimaltestdata/copy.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/copy.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/copy.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/copyabs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/copyabs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/copyabs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/copynegate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/copynegate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/copynegate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/copysign.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/copysign.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/copysign.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddAbs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddAbs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddAbs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddAdd.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddAdd.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddAdd.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble
@@ -1029,6 +1029,16 @@
 ddadd71707 add 130E-2   -1E0    -> 0.30
 ddadd71708 add 1E2      -1E4    -> -9.9E+3
 
+-- query from Vincent Kulandaisamy
+rounding: ceiling
+ddadd71801  add  7.8822773805862E+277    -5.1757503820663E-21 -> 7.882277380586200E+277 Inexact Rounded
+ddadd71802  add  7.882277380586200E+277  12.341               -> 7.882277380586201E+277 Inexact Rounded
+ddadd71803  add  7.882277380586201E+277  2.7270545046613E-31  -> 7.882277380586202E+277 Inexact Rounded
+
+ddadd71811  add                   12.341 -5.1757503820663E-21 -> 12.34100000000000      Inexact Rounded
+ddadd71812  add        12.34100000000000 2.7270545046613E-31  -> 12.34100000000001      Inexact Rounded
+ddadd71813  add        12.34100000000001 7.8822773805862E+277 -> 7.882277380586201E+277 Inexact Rounded
+
 -- Gappy coefficients; check residue handling even with full coefficient gap
 rounding: half_even
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddAnd.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddAnd.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddAnd.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddBase.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddBase.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddBase.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCanonical.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCanonical.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCanonical.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This file tests that copy operations leave uncanonical operands
 -- unchanged, and vice versa

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddClass.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddClass.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddClass.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- [New 2006.11.27]
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCompare.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCompare.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCompare.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCompareSig.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCompareSig.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCompareSig.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotal.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotal.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotal.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotalMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotalMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCompareTotalMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCopy.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCopy.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCopy.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCopyAbs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCopyAbs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCopyAbs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCopyNegate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCopyNegate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCopyNegate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddCopySign.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddCopySign.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddCopySign.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddDivide.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddDivide.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddDivide.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddDivideInt.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddDivideInt.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddDivideInt.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddEncode.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddEncode.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddEncode.decTest	Tue Nov 27 00:23:18 2007
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal64.decTest]
-version: 2.56
+version: 2.57
 
 -- This set of tests is for the eight-byte concrete representation.
 -- Its characteristics are:
@@ -485,3 +485,6 @@
 decd829 apply  #2238000115afb55b ->  4294967295
 decd830 apply  #2238000115afb57a ->  4294967296
 decd831 apply  #2238000115afb57b ->  4294967297
+
+-- for narrowing
+decd840 apply  #2870000000000000 ->  2.000000000000000E-99

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddFMA.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddFMA.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddFMA.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384
@@ -1663,6 +1663,34 @@
 ddfma375088 fma  1  12345678 1E-34                   -> 12345678.00000001 Inexact Rounded
 ddfma375089 fma  1  12345678 1E-35                   -> 12345678.00000001 Inexact Rounded
 
+-- desctructive subtraction (from remainder tests)
+
+-- +++ some of these will be off-by-one remainder vs remainderNear
+
+ddfma4000  fma  -1234567890123454   1.000000000000001    1234567890123456  ->  0.765432109876546
+ddfma4001  fma  -1234567890123443    1.00000000000001    1234567890123456  ->  0.65432109876557
+ddfma4002  fma  -1234567890123332     1.0000000000001    1234567890123456  ->  0.5432109876668
+ddfma4003  fma   -308641972530863   4.000000000000001    1234567890123455  ->  2.691358027469137
+ddfma4004  fma   -308641972530863   4.000000000000001    1234567890123456  ->  3.691358027469137
+ddfma4005  fma   -246913578024696     4.9999999999999    1234567890123456  ->  0.6913578024696
+ddfma4006  fma   -246913578024691    4.99999999999999    1234567890123456  ->  3.46913578024691
+ddfma4007  fma   -246913578024691   4.999999999999999    1234567890123456  ->  1.246913578024691
+ddfma4008  fma   -246913578024691   5.000000000000001    1234567890123456  ->  0.753086421975309
+ddfma4009  fma   -246913578024690    5.00000000000001    1234567890123456  ->  3.53086421975310
+ddfma4010  fma   -246913578024686     5.0000000000001    1234567890123456  ->  1.3086421975314
+ddfma4011  fma  -1234567890123455   1.000000000000001    1234567890123456  ->  -0.234567890123455
+ddfma4012  fma  -1234567890123444    1.00000000000001    1234567890123456  ->  -0.34567890123444
+ddfma4013  fma  -1234567890123333     1.0000000000001    1234567890123456  ->  -0.4567890123333
+ddfma4014  fma   -308641972530864   4.000000000000001    1234567890123455  ->  -1.308641972530864
+ddfma4015  fma   -308641972530864   4.000000000000001    1234567890123456  ->  -0.308641972530864
+ddfma4016  fma   -246913578024696     4.9999999999999    1234567890123456  ->  0.6913578024696
+ddfma4017  fma   -246913578024692    4.99999999999999    1234567890123456  ->  -1.53086421975308
+ddfma4018  fma   -246913578024691   4.999999999999999    1234567890123456  ->  1.246913578024691
+ddfma4019  fma   -246913578024691   5.000000000000001    1234567890123456  ->  0.753086421975309
+ddfma4020  fma   -246913578024691    5.00000000000001    1234567890123456  ->  -1.46913578024691
+ddfma4021  fma   -246913578024686     5.0000000000001    1234567890123456  ->  1.3086421975314
+
+
 -- Null tests
 ddfma39990 fma  1  10  # -> NaN Invalid_operation
 ddfma39991 fma  1   # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddInvert.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddInvert.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddInvert.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddLogB.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddLogB.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddLogB.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMax.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMax.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMax.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMaxMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMaxMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMaxMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMin.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMin.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMin.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMinMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMinMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMinMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMinus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMinus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMinus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddMultiply.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddMultiply.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddMultiply.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble
@@ -454,9 +454,92 @@
 -- hugest
 ddmul909 multiply  9999999999999999 9999999999999999 -> 9.999999999999998E+31 Inexact Rounded
 
+-- power-of-ten edge cases
+ddmul1001 multiply  1      10               -> 10
+ddmul1002 multiply  1      100              -> 100
+ddmul1003 multiply  1      1000             -> 1000
+ddmul1004 multiply  1      10000            -> 10000
+ddmul1005 multiply  1      100000           -> 100000
+ddmul1006 multiply  1      1000000          -> 1000000
+ddmul1007 multiply  1      10000000         -> 10000000
+ddmul1008 multiply  1      100000000        -> 100000000
+ddmul1009 multiply  1      1000000000       -> 1000000000
+ddmul1010 multiply  1      10000000000      -> 10000000000
+ddmul1011 multiply  1      100000000000     -> 100000000000
+ddmul1012 multiply  1      1000000000000    -> 1000000000000
+ddmul1013 multiply  1      10000000000000   -> 10000000000000
+ddmul1014 multiply  1      100000000000000  -> 100000000000000
+ddmul1015 multiply  1      1000000000000000 -> 1000000000000000
+ddmul1021 multiply  10     1                -> 10
+ddmul1022 multiply  10     10               -> 100
+ddmul1023 multiply  10     100              -> 1000
+ddmul1024 multiply  10     1000             -> 10000
+ddmul1025 multiply  10     10000            -> 100000
+ddmul1026 multiply  10     100000           -> 1000000
+ddmul1027 multiply  10     1000000          -> 10000000
+ddmul1028 multiply  10     10000000         -> 100000000
+ddmul1029 multiply  10     100000000        -> 1000000000
+ddmul1030 multiply  10     1000000000       -> 10000000000
+ddmul1031 multiply  10     10000000000      -> 100000000000
+ddmul1032 multiply  10     100000000000     -> 1000000000000
+ddmul1033 multiply  10     1000000000000    -> 10000000000000
+ddmul1034 multiply  10     10000000000000   -> 100000000000000
+ddmul1035 multiply  10     100000000000000  -> 1000000000000000
+ddmul1041 multiply  100    0.1              -> 10.0
+ddmul1042 multiply  100    1                -> 100
+ddmul1043 multiply  100    10               -> 1000
+ddmul1044 multiply  100    100              -> 10000
+ddmul1045 multiply  100    1000             -> 100000
+ddmul1046 multiply  100    10000            -> 1000000
+ddmul1047 multiply  100    100000           -> 10000000
+ddmul1048 multiply  100    1000000          -> 100000000
+ddmul1049 multiply  100    10000000         -> 1000000000
+ddmul1050 multiply  100    100000000        -> 10000000000
+ddmul1051 multiply  100    1000000000       -> 100000000000
+ddmul1052 multiply  100    10000000000      -> 1000000000000
+ddmul1053 multiply  100    100000000000     -> 10000000000000
+ddmul1054 multiply  100    1000000000000    -> 100000000000000
+ddmul1055 multiply  100    10000000000000   -> 1000000000000000
+ddmul1061 multiply  1000   0.01             -> 10.00
+ddmul1062 multiply  1000   0.1              -> 100.0
+ddmul1063 multiply  1000   1                -> 1000
+ddmul1064 multiply  1000   10               -> 10000
+ddmul1065 multiply  1000   100              -> 100000
+ddmul1066 multiply  1000   1000             -> 1000000
+ddmul1067 multiply  1000   10000            -> 10000000
+ddmul1068 multiply  1000   100000           -> 100000000
+ddmul1069 multiply  1000   1000000          -> 1000000000
+ddmul1070 multiply  1000   10000000         -> 10000000000
+ddmul1071 multiply  1000   100000000        -> 100000000000
+ddmul1072 multiply  1000   1000000000       -> 1000000000000
+ddmul1073 multiply  1000   10000000000      -> 10000000000000
+ddmul1074 multiply  1000   100000000000     -> 100000000000000
+ddmul1075 multiply  1000   1000000000000    -> 1000000000000000
+ddmul1081 multiply  10000  0.001            -> 10.000
+ddmul1082 multiply  10000  0.01             -> 100.00
+ddmul1083 multiply  10000  0.1              -> 1000.0
+ddmul1084 multiply  10000  1                -> 10000
+ddmul1085 multiply  10000  10               -> 100000
+ddmul1086 multiply  10000  100              -> 1000000
+ddmul1087 multiply  10000  1000             -> 10000000
+ddmul1088 multiply  10000  10000            -> 100000000
+ddmul1089 multiply  10000  100000           -> 1000000000
+ddmul1090 multiply  10000  1000000          -> 10000000000
+ddmul1091 multiply  10000  10000000         -> 100000000000
+ddmul1092 multiply  10000  100000000        -> 1000000000000
+ddmul1093 multiply  10000  1000000000       -> 10000000000000
+ddmul1094 multiply  10000  10000000000      -> 100000000000000
+ddmul1095 multiply  10000  100000000000     -> 1000000000000000
+
+ddmul1097 multiply  10000   99999999999     ->  999999999990000
+ddmul1098 multiply  10000   99999999999     ->  999999999990000
+
+
+
+
 -- Null tests
-ddmul990 multiply 10  # -> NaN Invalid_operation
-ddmul991 multiply  # 10 -> NaN Invalid_operation
+ddmul9990 multiply 10  # -> NaN Invalid_operation
+ddmul9991 multiply  # 10 -> NaN Invalid_operation
 
 
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddNextMinus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddNextMinus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddNextMinus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddNextPlus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddNextPlus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddNextPlus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddNextToward.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddNextToward.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddNextToward.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddOr.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddOr.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddOr.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddPlus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddPlus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddPlus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddQuantize.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddQuantize.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddQuantize.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddReduce.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddReduce.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddReduce.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddRemainder.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddRemainder.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddRemainder.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384
@@ -581,6 +581,19 @@
 ddrem1057 remainder -1e-277  1e+311 -> -1E-277
 ddrem1058 remainder -1e-277 -1e+311 -> -1E-277
 
+-- destructive subtract
+ddrem1101 remainder  1234567890123456  1.000000000000001  ->  0.765432109876546
+ddrem1102 remainder  1234567890123456   1.00000000000001  ->   0.65432109876557
+ddrem1103 remainder  1234567890123456    1.0000000000001  ->    0.5432109876668
+ddrem1104 remainder  1234567890123455  4.000000000000001  ->  2.691358027469137
+ddrem1105 remainder  1234567890123456  4.000000000000001  ->  3.691358027469137
+ddrem1106 remainder  1234567890123456    4.9999999999999  ->    0.6913578024696
+ddrem1107 remainder  1234567890123456   4.99999999999999  ->   3.46913578024691
+ddrem1108 remainder  1234567890123456  4.999999999999999  ->  1.246913578024691
+ddrem1109 remainder  1234567890123456  5.000000000000001  ->  0.753086421975309
+ddrem1110 remainder  1234567890123456   5.00000000000001  ->   3.53086421975310
+ddrem1111 remainder  1234567890123456    5.0000000000001  ->    1.3086421975314
+
 -- Null tests
 ddrem1000 remainder 10  # -> NaN Invalid_operation
 ddrem1001 remainder  # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddRemainderNear.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddRemainderNear.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddRemainderNear.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384
@@ -599,6 +599,7 @@
 
 ddrmn980 remaindernear 123e1 1000E299 -> 1.23E+3  -- 123E+1 internally
 
+
 -- overflow and underflow tests [from divide]
 ddrmn1051 remaindernear  1e+277  1e-311 ->  NaN Division_impossible
 ddrmn1052 remaindernear  1e+277 -1e-311 ->  NaN Division_impossible
@@ -609,6 +610,19 @@
 ddrmn1057 remaindernear -1e-277  1e+311 -> -1E-277
 ddrmn1058 remaindernear -1e-277 -1e+311 -> -1E-277
 
+-- destructive subtract
+ddrmn1100 remainderNear  1234567890123456  1.000000000000001  ->  -0.234567890123455
+ddrmn1101 remainderNear  1234567890123456   1.00000000000001  ->   -0.34567890123444
+ddrmn1102 remainderNear  1234567890123456    1.0000000000001  ->    -0.4567890123333
+ddrmn1103 remainderNear  1234567890123455  4.000000000000001  ->  -1.308641972530864
+ddrmn1104 remainderNear  1234567890123456  4.000000000000001  ->  -0.308641972530864
+ddrmn1115 remainderNear  1234567890123456    4.9999999999999  ->     0.6913578024696
+ddrmn1116 remainderNear  1234567890123456   4.99999999999999  ->   -1.53086421975308
+ddrmn1117 remainderNear  1234567890123456  4.999999999999999  ->   1.246913578024691
+ddrmn1118 remainderNear  1234567890123456  5.000000000000001  ->   0.753086421975309
+ddrmn1119 remainderNear  1234567890123456   5.00000000000001  ->   -1.46913578024691
+ddrmn1110 remainderNear  1234567890123456    5.0000000000001  ->     1.3086421975314
+
 -- Null tests
 ddrmn1000 remaindernear 10  # -> NaN Invalid_operation
 ddrmn1001 remaindernear  # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddRotate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddRotate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddRotate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddSameQuantum.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddSameQuantum.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddSameQuantum.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddScaleB.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddScaleB.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddScaleB.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddShift.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddShift.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddShift.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddSubtract.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddSubtract.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddSubtract.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddToIntegral.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddToIntegral.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddToIntegral.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value-exact' operations (from IEEE 854, later modified in 754r).

Modified: python/branches/py3k/Lib/test/decimaltestdata/ddXor.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ddXor.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ddXor.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 precision:   16
 maxExponent: 384

Modified: python/branches/py3k/Lib/test/decimaltestdata/decDouble.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/decDouble.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/decDouble.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- decDouble tests
 dectest: ddAbs

Modified: python/branches/py3k/Lib/test/decimaltestdata/decQuad.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/decQuad.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/decQuad.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- decQuad tests
 dectest: dqAbs

Modified: python/branches/py3k/Lib/test/decimaltestdata/decSingle.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/decSingle.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/decSingle.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- decSingle tests
 dectest: dsBase

Modified: python/branches/py3k/Lib/test/decimaltestdata/divide.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/divide.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/divide.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/divideint.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/divideint.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/divideint.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqAbs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqAbs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqAbs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqAdd.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqAdd.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqAdd.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqAnd.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqAnd.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqAnd.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqBase.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqBase.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqBase.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCanonical.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCanonical.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCanonical.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This file tests that copy operations leave uncanonical operands
 -- unchanged, and vice versa

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqClass.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqClass.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqClass.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- [New 2006.11.27]
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCompare.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCompare.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCompare.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCompareSig.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCompareSig.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCompareSig.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotal.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotal.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotal.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotalMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotalMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCompareTotalMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCopy.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCopy.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCopy.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCopyAbs.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCopyAbs.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCopyAbs.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCopyNegate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCopyNegate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCopyNegate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqCopySign.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqCopySign.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqCopySign.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqDivide.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqDivide.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqDivide.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqDivideInt.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqDivideInt.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqDivideInt.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqEncode.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqEncode.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqEncode.decTest	Tue Nov 27 00:23:18 2007
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal128.decTest]
-version: 2.56
+version: 2.57
 
 -- This set of tests is for the sixteen-byte concrete representation.
 -- Its characteristics are:
@@ -468,3 +468,10 @@
 decq829 apply  #22080000000000000000000115afb55b ->  4294967295
 decq830 apply  #22080000000000000000000115afb57a ->  4294967296
 decq831 apply  #22080000000000000000000115afb57b ->  4294967297
+
+-- VG testcase
+decq840 apply    #2080000000000000F294000000172636 -> 8.81125000000001349436E-1548
+decq841 apply    #20800000000000008000000000000000 -> 8.000000000000000000E-1550
+decq842 apply    #1EF98490000000010F6E4E0000000000 -> 7.049000000000010795488000000000000E-3097
+decq843 multiply #20800000000000008000000000000000 #2080000000000000F294000000172636 -> #1EF98490000000010F6E4E0000000000 Rounded
+

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqFMA.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqFMA.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqFMA.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1
@@ -1754,6 +1754,31 @@
 dqadd375088 fma  1  12398765432112345678945678 1E-34                   -> 12398765432112345678945678.00000001 Inexact Rounded
 dqadd375089 fma  1  12398765432112345678945678 1E-35                   -> 12398765432112345678945678.00000001 Inexact Rounded
 
+-- Destructive subtract (from remainder tests)
+
+-- +++ some of these will be off-by-one remainder vs remainderNear
+
+dqfma4000  fma  -1234567890123456789012345678901233   1.000000000000000000000000000000001    1234567890123456789012345678901234  ->  -0.234567890123456789012345678901233
+dqfma4001  fma  -1234567890123456789012345678901222    1.00000000000000000000000000000001    1234567890123456789012345678901234  ->  -0.34567890123456789012345678901222
+dqfma4002  fma  -1234567890123456789012345678901111     1.0000000000000000000000000000001    1234567890123456789012345678901234  ->  -0.4567890123456789012345678901111
+dqfma4003  fma   -308641972530864197253086419725314   4.000000000000000000000000000000001    1234567890123456789012345678901255  ->  -1.308641972530864197253086419725314
+dqfma4004  fma   -308641972530864197253086419725308   4.000000000000000000000000000000001    1234567890123456789012345678901234  ->  1.691358027469135802746913580274692
+dqfma4005  fma   -246913578024691357802469135780252     4.9999999999999999999999999999999    1234567890123456789012345678901234  ->  -1.3086421975308642197530864219748
+dqfma4006  fma   -246913578024691357802469135780247    4.99999999999999999999999999999999    1234567890123456789012345678901234  ->  1.46913578024691357802469135780247
+dqfma4007  fma   -246913578024691357802469135780247   4.999999999999999999999999999999999    1234567890123456789012345678901234  ->  -0.753086421975308642197530864219753
+dqfma4008  fma   -246913578024691357802469135780247   5.000000000000000000000000000000001    1234567890123456789012345678901234  ->  -1.246913578024691357802469135780247
+dqfma4009  fma   -246913578024691357802469135780246    5.00000000000000000000000000000001    1234567890123456789012345678901234  ->  1.53086421975308642197530864219754
+dqfma4010  fma   -246913578024691357802469135780242     5.0000000000000000000000000000001    1234567890123456789012345678901234  ->  -0.6913578024691357802469135780242
+dqfma4011  fma  -1234567890123456789012345678901232   1.000000000000000000000000000000001    1234567890123456789012345678901234  ->  0.765432109876543210987654321098768
+dqfma4012  fma  -1234567890123456789012345678901221    1.00000000000000000000000000000001    1234567890123456789012345678901234  ->  0.65432109876543210987654321098779
+dqfma4013  fma  -1234567890123456789012345678901110     1.0000000000000000000000000000001    1234567890123456789012345678901234  ->  0.5432109876543210987654321098890
+dqfma4014  fma   -308641972530864197253086419725313   4.000000000000000000000000000000001    1234567890123456789012345678901255  ->  2.691358027469135802746913580274687
+dqfma4015  fma   -308641972530864197253086419725308   4.000000000000000000000000000000001    1234567890123456789012345678901234  ->  1.691358027469135802746913580274692
+dqfma4016  fma   -246913578024691357802469135780251     4.9999999999999999999999999999999    1234567890123456789012345678901234  ->  3.6913578024691357802469135780251
+dqfma4017  fma   -246913578024691357802469135780247    4.99999999999999999999999999999999    1234567890123456789012345678901234  ->  1.46913578024691357802469135780247
+dqfma4018  fma   -246913578024691357802469135780246   4.999999999999999999999999999999999    1234567890123456789012345678901234  ->  4.246913578024691357802469135780246
+dqfma4019  fma   -246913578024691357802469135780241     5.0000000000000000000000000000001    1234567890123456789012345678901234  ->  4.3086421975308642197530864219759
+
 -- Null tests
 dqadd39990 fma  1  10  # -> NaN Invalid_operation
 dqadd39991 fma  1   # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqInvert.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqInvert.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqInvert.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqLogB.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqLogB.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqLogB.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMax.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMax.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMax.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMaxMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMaxMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMaxMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMin.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMin.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMin.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMinMag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMinMag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMinMag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMinus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMinus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMinus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqMultiply.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqMultiply.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqMultiply.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad
@@ -456,18 +456,134 @@
 
 -- hugest
 dqmul909 multiply 9999999999999999999999999999999999 9999999999999999999999999999999999 -> 9.999999999999999999999999999999998E+67 Inexact Rounded
+-- VG case
+dqmul910 multiply 8.81125000000001349436E-1548 8.000000000000000000E-1550 -> 7.049000000000010795488000000000000E-3097 Rounded
 
 -- Examples from SQL proposal (Krishna Kulkarni)
 precision:   34
 rounding:    half_up
 maxExponent: 6144
 minExponent: -6143
-dqmul1001  multiply 130E-2  120E-2 -> 1.5600
-dqmul1002  multiply 130E-2  12E-1  -> 1.560
-dqmul1003  multiply 130E-2  1E0    -> 1.30
-dqmul1004  multiply 1E2     1E4    -> 1E+6
+dqmul911  multiply 130E-2  120E-2 -> 1.5600
+dqmul912  multiply 130E-2  12E-1  -> 1.560
+dqmul913  multiply 130E-2  1E0    -> 1.30
+dqmul914  multiply 1E2     1E4    -> 1E+6
+
+-- power-of-ten edge cases
+dqmul1001 multiply  1      10               -> 10
+dqmul1002 multiply  1      100              -> 100
+dqmul1003 multiply  1      1000             -> 1000
+dqmul1004 multiply  1      10000            -> 10000
+dqmul1005 multiply  1      100000           -> 100000
+dqmul1006 multiply  1      1000000          -> 1000000
+dqmul1007 multiply  1      10000000         -> 10000000
+dqmul1008 multiply  1      100000000        -> 100000000
+dqmul1009 multiply  1      1000000000       -> 1000000000
+dqmul1010 multiply  1      10000000000      -> 10000000000
+dqmul1011 multiply  1      100000000000     -> 100000000000
+dqmul1012 multiply  1      1000000000000    -> 1000000000000
+dqmul1013 multiply  1      10000000000000   -> 10000000000000
+dqmul1014 multiply  1      100000000000000  -> 100000000000000
+dqmul1015 multiply  1      1000000000000000 -> 1000000000000000
+
+dqmul1016 multiply  1      1000000000000000000 -> 1000000000000000000
+dqmul1017 multiply  1      100000000000000000000000000 -> 100000000000000000000000000
+dqmul1018 multiply  1      1000000000000000000000000000 -> 1000000000000000000000000000
+dqmul1019 multiply  1      10000000000000000000000000000 -> 10000000000000000000000000000
+dqmul1020 multiply  1      1000000000000000000000000000000000 -> 1000000000000000000000000000000000
+
+dqmul1021 multiply  10     1                -> 10
+dqmul1022 multiply  10     10               -> 100
+dqmul1023 multiply  10     100              -> 1000
+dqmul1024 multiply  10     1000             -> 10000
+dqmul1025 multiply  10     10000            -> 100000
+dqmul1026 multiply  10     100000           -> 1000000
+dqmul1027 multiply  10     1000000          -> 10000000
+dqmul1028 multiply  10     10000000         -> 100000000
+dqmul1029 multiply  10     100000000        -> 1000000000
+dqmul1030 multiply  10     1000000000       -> 10000000000
+dqmul1031 multiply  10     10000000000      -> 100000000000
+dqmul1032 multiply  10     100000000000     -> 1000000000000
+dqmul1033 multiply  10     1000000000000    -> 10000000000000
+dqmul1034 multiply  10     10000000000000   -> 100000000000000
+dqmul1035 multiply  10     100000000000000  -> 1000000000000000
+
+dqmul1036 multiply  10     100000000000000000 -> 1000000000000000000
+dqmul1037 multiply  10     10000000000000000000000000 -> 100000000000000000000000000
+dqmul1038 multiply  10     100000000000000000000000000 -> 1000000000000000000000000000
+dqmul1039 multiply  10     1000000000000000000000000000 -> 10000000000000000000000000000
+dqmul1040 multiply  10     100000000000000000000000000000000 -> 1000000000000000000000000000000000
+
+dqmul1041 multiply  100    0.1              -> 10.0
+dqmul1042 multiply  100    1                -> 100
+dqmul1043 multiply  100    10               -> 1000
+dqmul1044 multiply  100    100              -> 10000
+dqmul1045 multiply  100    1000             -> 100000
+dqmul1046 multiply  100    10000            -> 1000000
+dqmul1047 multiply  100    100000           -> 10000000
+dqmul1048 multiply  100    1000000          -> 100000000
+dqmul1049 multiply  100    10000000         -> 1000000000
+dqmul1050 multiply  100    100000000        -> 10000000000
+dqmul1051 multiply  100    1000000000       -> 100000000000
+dqmul1052 multiply  100    10000000000      -> 1000000000000
+dqmul1053 multiply  100    100000000000     -> 10000000000000
+dqmul1054 multiply  100    1000000000000    -> 100000000000000
+dqmul1055 multiply  100    10000000000000   -> 1000000000000000
+
+dqmul1056 multiply  100    10000000000000000 -> 1000000000000000000
+dqmul1057 multiply  100    1000000000000000000000000 -> 100000000000000000000000000
+dqmul1058 multiply  100    10000000000000000000000000 -> 1000000000000000000000000000
+dqmul1059 multiply  100    100000000000000000000000000 -> 10000000000000000000000000000
+dqmul1060 multiply  100    10000000000000000000000000000000 -> 1000000000000000000000000000000000
+
+dqmul1061 multiply  1000   0.01             -> 10.00
+dqmul1062 multiply  1000   0.1              -> 100.0
+dqmul1063 multiply  1000   1                -> 1000
+dqmul1064 multiply  1000   10               -> 10000
+dqmul1065 multiply  1000   100              -> 100000
+dqmul1066 multiply  1000   1000             -> 1000000
+dqmul1067 multiply  1000   10000            -> 10000000
+dqmul1068 multiply  1000   100000           -> 100000000
+dqmul1069 multiply  1000   1000000          -> 1000000000
+dqmul1070 multiply  1000   10000000         -> 10000000000
+dqmul1071 multiply  1000   100000000        -> 100000000000
+dqmul1072 multiply  1000   1000000000       -> 1000000000000
+dqmul1073 multiply  1000   10000000000      -> 10000000000000
+dqmul1074 multiply  1000   100000000000     -> 100000000000000
+dqmul1075 multiply  1000   1000000000000    -> 1000000000000000
+
+dqmul1076 multiply  1000   1000000000000000 -> 1000000000000000000
+dqmul1077 multiply  1000   100000000000000000000000 -> 100000000000000000000000000
+dqmul1078 multiply  1000   1000000000000000000000000 -> 1000000000000000000000000000
+dqmul1079 multiply  1000   10000000000000000000000000 -> 10000000000000000000000000000
+dqmul1080 multiply  1000   1000000000000000000000000000000 -> 1000000000000000000000000000000000
+
+dqmul1081 multiply  10000  0.001            -> 10.000
+dqmul1082 multiply  10000  0.01             -> 100.00
+dqmul1083 multiply  10000  0.1              -> 1000.0
+dqmul1084 multiply  10000  1                -> 10000
+dqmul1085 multiply  10000  10               -> 100000
+dqmul1086 multiply  10000  100              -> 1000000
+dqmul1087 multiply  10000  1000             -> 10000000
+dqmul1088 multiply  10000  10000            -> 100000000
+dqmul1089 multiply  10000  100000           -> 1000000000
+dqmul1090 multiply  10000  1000000          -> 10000000000
+dqmul1091 multiply  10000  10000000         -> 100000000000
+dqmul1092 multiply  10000  100000000        -> 1000000000000
+dqmul1093 multiply  10000  1000000000       -> 10000000000000
+dqmul1094 multiply  10000  10000000000      -> 100000000000000
+dqmul1095 multiply  10000  100000000000     -> 1000000000000000
+
+dqmul1096 multiply  10000  100000000000000 -> 1000000000000000000
+dqmul1097 multiply  10000  10000000000000000000000 -> 100000000000000000000000000
+dqmul1098 multiply  10000  100000000000000000000000 -> 1000000000000000000000000000
+dqmul1099 multiply  10000  1000000000000000000000000 -> 10000000000000000000000000000
+dqmul1100 multiply  10000  100000000000000000000000000000 -> 1000000000000000000000000000000000
+
+dqmul1107 multiply  10000   99999999999     ->  999999999990000
+dqmul1108 multiply  10000   99999999999     ->  999999999990000
 
 -- Null tests
-dqmul990 multiply 10  # -> NaN Invalid_operation
-dqmul991 multiply  # 10 -> NaN Invalid_operation
+dqmul9990 multiply 10  # -> NaN Invalid_operation
+dqmul9991 multiply  # 10 -> NaN Invalid_operation
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqNextMinus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqNextMinus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqNextMinus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqNextPlus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqNextPlus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqNextPlus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqNextToward.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqNextToward.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqNextToward.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqOr.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqOr.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqOr.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqPlus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqPlus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqPlus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqQuantize.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqQuantize.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqQuantize.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqReduce.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqReduce.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqReduce.decTest	Tue Nov 27 00:23:18 2007
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqRemainder.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqRemainder.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqRemainder.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1
@@ -580,6 +580,17 @@
 -- Gyuris example
 dqrem1070 remainder 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 8.336804418094040989630006819881709E-6143
 
+-- destructive subtract
+dqrem1120  remainder  1234567890123456789012345678901234  1.000000000000000000000000000000001  ->  0.765432109876543210987654321098768
+dqrem1121  remainder  1234567890123456789012345678901234   1.00000000000000000000000000000001  ->   0.65432109876543210987654321098779
+dqrem1122  remainder  1234567890123456789012345678901234    1.0000000000000000000000000000001  ->    0.5432109876543210987654321098890
+dqrem1123  remainder  1234567890123456789012345678901255  4.000000000000000000000000000000001  ->  2.691358027469135802746913580274687
+dqrem1124  remainder  1234567890123456789012345678901234  4.000000000000000000000000000000001  ->  1.691358027469135802746913580274692
+dqrem1125  remainder  1234567890123456789012345678901234    4.9999999999999999999999999999999  ->    3.6913578024691357802469135780251
+dqrem1126  remainder  1234567890123456789012345678901234   4.99999999999999999999999999999999  ->   1.46913578024691357802469135780247
+dqrem1127  remainder  1234567890123456789012345678901234  4.999999999999999999999999999999999  ->  4.246913578024691357802469135780246
+dqrem1128  remainder  1234567890123456789012345678901234    5.0000000000000000000000000000001  ->    4.3086421975308642197530864219759
+
 -- Null tests
 dqrem1000 remainder 10  # -> NaN Invalid_operation
 dqrem1001 remainder  # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqRemainderNear.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqRemainderNear.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqRemainderNear.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1
@@ -612,6 +612,19 @@
 -- Gyuris example
 dqrmn1070 remainder 8.336804418094040989630006819881709E-6143 8.336804418094040989630006819889000E-6143 -> 8.336804418094040989630006819881709E-6143
 
+-- destructive subtract
+dqrmn1101  remaindernear  1234567890123456789012345678901234  1.000000000000000000000000000000001  ->  -0.234567890123456789012345678901233
+dqrmn1102  remaindernear  1234567890123456789012345678901234   1.00000000000000000000000000000001  ->   -0.34567890123456789012345678901222
+dqrmn1103  remaindernear  1234567890123456789012345678901234    1.0000000000000000000000000000001  ->    -0.4567890123456789012345678901111
+dqrmn1104  remaindernear  1234567890123456789012345678901255  4.000000000000000000000000000000001  ->  -1.308641972530864197253086419725314
+dqrmn1105  remaindernear  1234567890123456789012345678901234  4.000000000000000000000000000000001  ->   1.691358027469135802746913580274692
+dqrmn1106  remaindernear  1234567890123456789012345678901234    4.9999999999999999999999999999999  ->    -1.3086421975308642197530864219748
+dqrmn1107  remaindernear  1234567890123456789012345678901234   4.99999999999999999999999999999999  ->    1.46913578024691357802469135780247
+dqrmn1108  remaindernear  1234567890123456789012345678901234  4.999999999999999999999999999999999  ->  -0.753086421975308642197530864219753
+dqrmn1109  remaindernear  1234567890123456789012345678901234  5.000000000000000000000000000000001  ->  -1.246913578024691357802469135780247
+dqrmn1110  remaindernear  1234567890123456789012345678901234   5.00000000000000000000000000000001  ->    1.53086421975308642197530864219754
+dqrmn1111  remaindernear  1234567890123456789012345678901234    5.0000000000000000000000000000001  ->    -0.6913578024691357802469135780242
+
 -- Null tests
 dqrmn1000 remaindernear 10  # -> NaN Invalid_operation
 dqrmn1001 remaindernear  # 10 -> NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqRotate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqRotate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqRotate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqSameQuantum.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqSameQuantum.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqSameQuantum.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqScaleB.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqScaleB.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqScaleB.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqShift.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqShift.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqShift.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqSubtract.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqSubtract.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqSubtract.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqToIntegral.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqToIntegral.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqToIntegral.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value-exact' operations (from IEEE 854, later modified in 754r).

Modified: python/branches/py3k/Lib/test/decimaltestdata/dqXor.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dqXor.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dqXor.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 clamp:       1

Modified: python/branches/py3k/Lib/test/decimaltestdata/dsBase.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dsBase.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dsBase.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)
@@ -1058,4 +1058,5 @@
 dsbas1107 toSci +1E-383 ->  0E-101 Inexact Rounded Subnormal Underflow Clamped
 dsbas1108 toSci +9.999999999999999E+384 ->  Infinity Overflow Inexact Rounded
 
-
+-- narrowing case
+dsbas1110 toSci 2.000000000000000E-99 -> 2.00E-99 Rounded Subnormal

Modified: python/branches/py3k/Lib/test/decimaltestdata/dsEncode.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/dsEncode.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/dsEncode.decTest	Tue Nov 27 00:23:18 2007
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal32.decTest]
-version: 2.56
+version: 2.57
 
 -- This set of tests is for the four-byte concrete representation.
 -- Its characteristics are:
@@ -367,3 +367,6 @@
 decs786 apply   #225002ff       -> 999
 decs787 apply   #225003ff       -> 999
 
+-- narrowing case
+decs790 apply 2.00E-99 -> #00000100 Subnormal
+decs791 apply #00000100 -> 2.00E-99 Subnormal

Modified: python/branches/py3k/Lib/test/decimaltestdata/exp.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/exp.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/exp.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Tests of the exponential funtion.  Currently all testcases here
 -- show results which are correctly rounded (within <= 0.5 ulp).

Modified: python/branches/py3k/Lib/test/decimaltestdata/fma.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/fma.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/fma.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/inexact.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/inexact.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/inexact.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/invert.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/invert.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/invert.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/ln.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/ln.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/ln.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   16

Modified: python/branches/py3k/Lib/test/decimaltestdata/log10.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/log10.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/log10.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This emphasises the testing of notable cases, as they will often
 -- have unusual paths (especially the 10**n results).

Modified: python/branches/py3k/Lib/test/decimaltestdata/logb.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/logb.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/logb.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This emphasises the testing of notable cases, as they will often
 -- have unusual paths (especially the 10**n results).

Modified: python/branches/py3k/Lib/test/decimaltestdata/max.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/max.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/max.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/maxmag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/maxmag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/maxmag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/min.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/min.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/min.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/minmag.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/minmag.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/minmag.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/py3k/Lib/test/decimaltestdata/minus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/minus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/minus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests primarily tests the existence of the operator.
 -- Subtraction, rounding, and more overflows are tested elsewhere.

Modified: python/branches/py3k/Lib/test/decimaltestdata/multiply.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/multiply.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/multiply.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/nextminus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/nextminus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/nextminus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/nextplus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/nextplus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/nextplus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/nexttoward.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/nexttoward.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/nexttoward.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/or.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/or.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/or.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/plus.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/plus.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/plus.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests primarily tests the existence of the operator.
 -- Addition and rounding, and most overflows, are tested elsewhere.

Modified: python/branches/py3k/Lib/test/decimaltestdata/power.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/power.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/power.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- In addition to the power operator testcases here, see also the file
 -- powersqrt.decTest which includes all the tests from

Modified: python/branches/py3k/Lib/test/decimaltestdata/powersqrt.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/powersqrt.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/powersqrt.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- These testcases are taken from squareroot.decTest but are
 -- evaluated using the power operator.  The differences in results

Modified: python/branches/py3k/Lib/test/decimaltestdata/quantize.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/quantize.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/quantize.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.

Modified: python/branches/py3k/Lib/test/decimaltestdata/randomBound32.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/randomBound32.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/randomBound32.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.55
+version: 2.57
 
 -- These testcases test calculations at precisions 31, 32, and 33, to
 -- exercise the boundaries around 2**5

Modified: python/branches/py3k/Lib/test/decimaltestdata/randoms.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/randoms.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/randoms.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 maxexponent: 999999999

Modified: python/branches/py3k/Lib/test/decimaltestdata/reduce.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/reduce.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/reduce.decTest	Tue Nov 27 00:23:18 2007
@@ -19,7 +19,7 @@
 ------------------------------------------------------------------------
 -- [This used to be called normalize.]
 
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/remainder.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/remainder.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/remainder.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/remainderNear.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/remainderNear.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/remainderNear.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.55
+version: 2.57
 
 extended:    1
 precision:   9
@@ -413,6 +413,18 @@
 rmnx606 remaindernear  31.5 3  -> 1.5    -- i=10
 rmnx607 remaindernear  34.5 3  -> -1.5   -- i=11
 
+-- zero signs
+rmnx650 remaindernear  1  1 ->  0
+rmnx651 remaindernear -1  1 -> -0
+rmnx652 remaindernear  1 -1 ->  0
+rmnx653 remaindernear -1 -1 -> -0
+rmnx654 remaindernear  0  1 ->  0
+rmnx655 remaindernear -0  1 -> -0
+rmnx656 remaindernear  0 -1 ->  0
+rmnx657 remaindernear -0 -1 -> -0
+rmnx658 remaindernear  0.00  1  ->  0.00
+rmnx659 remaindernear -0.00  1  -> -0.00
+
 -- Specials
 rmnx680 remaindernear  Inf  -Inf   ->  NaN Invalid_operation
 rmnx681 remaindernear  Inf  -1000  ->  NaN Invalid_operation

Modified: python/branches/py3k/Lib/test/decimaltestdata/rescale.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/rescale.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/rescale.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- [obsolete]   Quantize.decTest has the improved version
 

Modified: python/branches/py3k/Lib/test/decimaltestdata/rotate.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/rotate.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/rotate.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/rounding.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/rounding.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/rounding.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- These tests require that implementations take account of residues in
 -- order to get correct results for some rounding modes.  Rather than

Modified: python/branches/py3k/Lib/test/decimaltestdata/samequantum.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/samequantum.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/samequantum.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/scaleb.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/scaleb.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/scaleb.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/shift.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/shift.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/shift.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/squareroot.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/squareroot.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/squareroot.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/subtract.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/subtract.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/subtract.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/decimaltestdata/testall.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/testall.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/testall.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- core tests (using Extended: 1) --------------------------------------
 dectest: base

Modified: python/branches/py3k/Lib/test/decimaltestdata/tointegral.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/tointegral.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/tointegral.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value' operation (from IEEE 854, later modified in 754r).

Modified: python/branches/py3k/Lib/test/decimaltestdata/tointegralx.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/tointegralx.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/tointegralx.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value' operation (from IEEE 854, later modified in 754r).

Modified: python/branches/py3k/Lib/test/decimaltestdata/xor.decTest
==============================================================================
--- python/branches/py3k/Lib/test/decimaltestdata/xor.decTest	(original)
+++ python/branches/py3k/Lib/test/decimaltestdata/xor.decTest	Tue Nov 27 00:23:18 2007
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.56
+version: 2.57
 
 extended:    1
 precision:   9

Modified: python/branches/py3k/Lib/test/test_decimal.py
==============================================================================
--- python/branches/py3k/Lib/test/test_decimal.py	(original)
+++ python/branches/py3k/Lib/test/test_decimal.py	Tue Nov 27 00:23:18 2007
@@ -464,6 +464,7 @@
         self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, None, 1), 2) )
         self.assertRaises(ValueError, Decimal, (1, (4, -3, 4, 9, 1), 2) )
         self.assertRaises(ValueError, Decimal, (1, (4, 10, 4, 9, 1), 2) )
+        self.assertRaises(ValueError, Decimal, (1, (4, 3, 4, 'a', 1), 2) )
 
     def test_explicit_from_Decimal(self):
 

Modified: python/branches/py3k/Lib/test/test_doctest.py
==============================================================================
--- python/branches/py3k/Lib/test/test_doctest.py	(original)
+++ python/branches/py3k/Lib/test/test_doctest.py	Tue Nov 27 00:23:18 2007
@@ -1916,6 +1916,7 @@
        provided.
 
          >>> import unittest, pkgutil, test
+         >>> added_loader = False
          >>> if not hasattr(test, '__loader__'):
          ...     test.__loader__ = pkgutil.get_loader(test)
          ...     added_loader = True

Modified: python/branches/py3k/Lib/test/test_funcattrs.py
==============================================================================
--- python/branches/py3k/Lib/test/test_funcattrs.py	(original)
+++ python/branches/py3k/Lib/test/test_funcattrs.py	Tue Nov 27 00:23:18 2007
@@ -215,6 +215,17 @@
     verify(c[0].__class__.__name__ == "cell") # don't have a type object handy
     cantset(f, "__closure__", c)
 
+def test_empty_cell():
+    def f(): print(a)
+    try:
+        f.__closure__[0].cell_contents
+    except ValueError:
+        pass
+    else:
+        raise TestFailed("shouldn't be able to read an empty cell")
+
+    a = 12
+
 def test_func_doc():
     def f(): pass
     verify(f.__doc__ is None)
@@ -339,6 +350,7 @@
 
 def testmore():
     test_func_closure()
+    test_empty_cell()
     test_func_doc()
     test_func_globals()
     test_func_name()

Modified: python/branches/py3k/Lib/trace.py
==============================================================================
--- python/branches/py3k/Lib/trace.py	(original)
+++ python/branches/py3k/Lib/trace.py	Tue Nov 27 00:23:18 2007
@@ -282,6 +282,8 @@
             # skip some "files" we don't care about...
             if filename == "<string>":
                 continue
+            if filename.startswith("<doctest "):
+                continue
 
             if filename.endswith((".pyc", ".pyo")):
                 filename = filename[:-1]

Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c	(original)
+++ python/branches/py3k/Modules/posixmodule.c	Tue Nov 27 00:23:18 2007
@@ -7117,6 +7117,10 @@
         /* Do not follow links.	 */
         if (ins(d, "O_NOFOLLOW", (long)O_NOFOLLOW)) return -1;
 #endif
+#ifdef O_NOATIME
+	/* Do not update the access time. */
+	if (ins(d, "O_NOATIME", (long)O_NOATIME)) return -1;
+#endif
 
 	/* These come from sysexits.h */
 #ifdef EX_OK

Modified: python/branches/py3k/Objects/cellobject.c
==============================================================================
--- python/branches/py3k/Objects/cellobject.c	(original)
+++ python/branches/py3k/Objects/cellobject.c	Tue Nov 27 00:23:18 2007
@@ -77,7 +77,12 @@
 static PyObject *
 cell_get_contents(PyCellObject *op, void *closure)
 {
-	Py_XINCREF(op->ob_ref);
+	if (op->ob_ref == NULL)
+	{
+		PyErr_SetString(PyExc_ValueError, "Cell is empty");
+		return NULL;
+	}
+	Py_INCREF(op->ob_ref);
 	return op->ob_ref;
 }
 

Modified: python/branches/py3k/Python/ast.c
==============================================================================
--- python/branches/py3k/Python/ast.c	(original)
+++ python/branches/py3k/Python/ast.c	Tue Nov 27 00:23:18 2007
@@ -19,6 +19,7 @@
 struct compiling {
     char *c_encoding; /* source encoding */
     PyArena *c_arena; /* arena for allocating memeory */
+    const char *c_filename; /* filename */
 };
 
 static asdl_seq *seq_for_testlist(struct compiling *, const node *);
@@ -226,6 +227,7 @@
         c.c_encoding = "utf-8";
     }
     c.c_arena = arena;
+    c.c_filename = filename;
 
     k = 0;
     switch (TYPE(n)) {


More information about the Python-3000-checkins mailing list