summaryrefslogtreecommitdiffstats
path: root/Lib/test/decimaltestdata/squareroot.decTest
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/decimaltestdata/squareroot.decTest')
-rw-r--r--Lib/test/decimaltestdata/squareroot.decTest24
1 files changed, 22 insertions, 2 deletions
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 @@ sqtx8625 squareroot 4.245E-19 -> 6.52E-10 Underflow Subnormal Inexact Rounded
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 @@ sqtx9005 squareroot 11025 -> 1.0E+2 Inexact Rounded
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 @@ sqtx9038 squareroot 0E+20 -> 0E+9 Clamped
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