~pythonregexp2.7/python/issue2636-09-01+10

« back to all changes in this revision

Viewing changes to Lib/test/decimaltestdata/squareroot.decTest

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 21:39:45 UTC
  • mfrom: (39055.1.33 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922213945-23717m5eiqpamcyn
Merged in changes from the Single-Loop Engine branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
------------------------------------------------------------------------
2
2
-- squareroot.decTest -- decimal square root                          --
 
3
-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
3
4
------------------------------------------------------------------------
4
5
-- Please see the document "General Decimal Arithmetic Testcases"     --
5
6
-- at http://www2.hursley.ibm.com/decimal for the description of      --
17
17
--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
18
18
--   mfc@uk.ibm.com                                                   --
19
19
------------------------------------------------------------------------
20
 
version: 2.57
 
20
version: 2.58
21
21
 
22
22
extended:    1
23
23
precision:   9
3671
3671
precision: 1
3672
3672
sqtx8626 squareroot 1E+18 -> 1E+9
3673
3673
sqtx8627 squareroot 1E+19 -> 3E+9 Inexact Rounded
 
3674
-- in this next one, intermediate result is 9486832980.505137996...
 
3675
-- so rounds down to 9 (not up to 10 which would cause Infinity overflow)
3674
3676
sqtx8628 squareroot 9E+19 -> 9E+9 Inexact Rounded
3675
3677
sqtx8629 squareroot 9.1E+19 -> Infinity Overflow Inexact Rounded
3676
3678
sqtx8630 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
3770
3772
precision: 1
3771
3773
sqtx9006 squareroot 11025   -> 1E+2    Inexact Rounded
3772
3774
 
 
3775
-- an interesting case
 
3776
precision:   7
 
3777
sqtx9007 squareroot 1600000e1 -> 4000
 
3778
 
3773
3779
-- Out-of-bounds zeros
3774
3780
precision: 4
3775
3781
sqtx9010 squareroot 0E-9  -> 0.00000
3799
3805
sqtx9039 squareroot 0E+21 -> 0E+9 Clamped
3800
3806
sqtx9040 squareroot 0E+22 -> 0E+9 Clamped
3801
3807
 
 
3808
-- if digits > emax maximum real exponent is negative
 
3809
maxexponent: 9
 
3810
minexponent: -9
 
3811
precision: 15
 
3812
clamp: 1
 
3813
sqtx9045 squareroot  1 -> 1.00000  Clamped
 
3814
 
 
3815
-- High-precision exact and inexact
 
3816
maxexponent: 999
 
3817
minexponent: -999
 
3818
precision: 400
 
3819
sqtx9050 squareroot 2 -> 1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641572735013846230912297024924836055850737212644121497099935831413222665927505592755799950501152782060571470109559971605970274534596862014728517418640889198609552329230484308714321450839762603627995251407989687253396546331808829640620615258352395054745750287759961729835575220337531857011354374603408498847 Inexact Rounded
 
3820
sqtx9051 squareroot 1089 -> 33
 
3821
sqtx9052 squareroot 10.89 -> 3.3
3802
3822
 
3803
3823
-- Null test
3804
3824
sqtx9900 squareroot  # -> NaN Invalid_operation