Merged revisions 65257 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r65257 | mark.dickinson | 2008-07-27 01:39:07 -0500 (Sun, 27 Jul 2008) | 3 lines

  Issue #3449: Update decimal module to use most recent specification
  (v. 1.68) and tests (v. 2.58) from IBM.
........
diff --git a/Lib/test/decimaltestdata/squareroot.decTest b/Lib/test/decimaltestdata/squareroot.decTest
index 8d7b26e..33e9689 100644
--- a/Lib/test/decimaltestdata/squareroot.decTest
+++ b/Lib/test/decimaltestdata/squareroot.decTest
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- squareroot.decTest -- decimal square root                          --
--- Copyright (c) IBM Corporation, 2003, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc@uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9
@@ -3671,6 +3671,8 @@
 precision: 1
 sqtx8626 squareroot 1E+18 -> 1E+9
 sqtx8627 squareroot 1E+19 -> 3E+9 Inexact Rounded
+-- in this next one, intermediate result is 9486832980.505137996...
+-- so rounds down to 9 (not up to 10 which would cause Infinity overflow)
 sqtx8628 squareroot 9E+19 -> 9E+9 Inexact Rounded
 sqtx8629 squareroot 9.1E+19 -> Infinity Overflow Inexact Rounded
 sqtx8630 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
@@ -3770,6 +3772,10 @@
 precision: 1
 sqtx9006 squareroot 11025   -> 1E+2    Inexact Rounded
 
+-- an interesting case
+precision:   7
+sqtx9007 squareroot 1600000e1 -> 4000
+
 -- Out-of-bounds zeros
 precision: 4
 sqtx9010 squareroot 0E-9  -> 0.00000
@@ -3799,6 +3805,20 @@
 sqtx9039 squareroot 0E+21 -> 0E+9 Clamped
 sqtx9040 squareroot 0E+22 -> 0E+9 Clamped
 
+-- if digits > emax maximum real exponent is negative
+maxexponent: 9
+minexponent: -9
+precision: 15
+clamp: 1
+sqtx9045 squareroot  1 -> 1.00000  Clamped
+
+-- High-precision exact and inexact
+maxexponent: 999
+minexponent: -999
+precision: 400
+sqtx9050 squareroot 2 -> 1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641572735013846230912297024924836055850737212644121497099935831413222665927505592755799950501152782060571470109559971605970274534596862014728517418640889198609552329230484308714321450839762603627995251407989687253396546331808829640620615258352395054745750287759961729835575220337531857011354374603408498847 Inexact Rounded
+sqtx9051 squareroot 1089 -> 33
+sqtx9052 squareroot 10.89 -> 3.3
 
 -- Null test
 sqtx9900 squareroot  # -> NaN Invalid_operation