⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 squareroot.dectest

📁 eda is an estimation of distributions algorithm
💻 DECTEST
📖 第 1 页 / 共 5 页
字号:
------------------------------------------------------------------------
-- squareroot.decTest -- decimal square root                          --
-- Copyright (c) IBM Corporation, 2002.  All rights reserved.         --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases"     --
-- at http://www2.hursley.ibm.com/decimal for the description of      --
-- these testcases.                                                   --
--                                                                    --
-- These testcases are experimental ('beta' versions), and they       --
-- may contain errors.  They are offered on an as-is basis.  In       --
-- particular, achieving the same results as the tests here is not    --
-- a guarantee that an implementation complies with any Standard      --
-- or specification.  The tests are not exhaustive.                   --
--                                                                    --
-- Please send comments, suggestions, and corrections to the author:  --
--   Mike Cowlishaw, IBM Fellow                                       --
--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
--   mfc@uk.ibm.com                                                   --
------------------------------------------------------------------------
version: 2.15

extended:    1
precision:   9
rounding:    half_up
maxExponent: 999

-- basics
sqtx001 squareroot 1      -> 1
sqtx002 squareroot -1     -> NaN Invalid_operation
sqtx003 squareroot 1.00   -> 1   Rounded
sqtx004 squareroot -1.00  -> NaN Invalid_operation
sqtx005 squareroot 0      -> 0
sqtx006 squareroot 0.00   -> 0
sqtx007 squareroot 00.0   -> 0
sqtx008 squareroot 00.00  -> 0
sqtx009 squareroot 00     -> 0

sqtx010 squareroot -2     -> NaN Invalid_operation
sqtx011 squareroot 2      -> 1.41421356 Inexact Rounded
sqtx012 squareroot -2.00  -> NaN Invalid_operation
sqtx013 squareroot 2.00   -> 1.41421356 Inexact Rounded
sqtx014 squareroot -0     -> -0
sqtx015 squareroot -0.00  -> -0
sqtx016 squareroot -00.0  -> -0
sqtx017 squareroot -0E+10 -> -0
sqtx018 squareroot -00    -> -0
sqtx019 squareroot 0E+5   -> 0
sqtx020 squareroot 4.0    -> 2 Rounded
sqtx021 squareroot 4.00   -> 2 Rounded


sqtx030 squareroot +0.1            -> 0.316227766 Inexact Rounded
sqtx031 squareroot -0.1            -> NaN Invalid_operation
sqtx032 squareroot +0.01           -> 0.1
sqtx033 squareroot -0.01           -> NaN Invalid_operation
sqtx034 squareroot +0.001          -> 0.0316227766 Inexact Rounded
sqtx035 squareroot -0.001          -> NaN Invalid_operation
sqtx036 squareroot +0.000001       -> 0.001
sqtx037 squareroot -0.000001       -> NaN Invalid_operation
sqtx038 squareroot +0.000000000001 -> 0.000001
sqtx039 squareroot -0.000000000001 -> NaN Invalid_operation

sqtx041 squareroot 1.1        -> 1.04880885 Inexact Rounded
sqtx042 squareroot 1.10       -> 1.04880885 Inexact Rounded
sqtx043 squareroot 1.100      -> 1.04880885 Inexact Rounded
sqtx044 squareroot 1.110      -> 1.05356538 Inexact Rounded
sqtx045 squareroot -1.1       -> NaN Invalid_operation
sqtx046 squareroot -1.10      -> NaN Invalid_operation
sqtx047 squareroot -1.100     -> NaN Invalid_operation
sqtx048 squareroot -1.110     -> NaN Invalid_operation
sqtx049 squareroot 9.9        -> 3.14642654 Inexact Rounded
sqtx050 squareroot 9.90       -> 3.14642654 Inexact Rounded
sqtx051 squareroot 9.900      -> 3.14642654 Inexact Rounded
sqtx052 squareroot 9.990      -> 3.16069613 Inexact Rounded
sqtx053 squareroot -9.9       -> NaN Invalid_operation
sqtx054 squareroot -9.90      -> NaN Invalid_operation
sqtx055 squareroot -9.900     -> NaN Invalid_operation
sqtx056 squareroot -9.990     -> NaN Invalid_operation

sqtx060 squareroot  10.0        -> 3.16227766 Inexact Rounded
sqtx061 squareroot  10.00       -> 3.16227766 Inexact Rounded
sqtx062 squareroot  100.0       -> 1E+1 Rounded
sqtx063 squareroot  100.00      -> 1E+1 Rounded
sqtx064 squareroot  1.1000E+3   -> 33.1662479 Inexact Rounded
sqtx065 squareroot  1.10000E+3  -> 33.1662479 Inexact Rounded
sqtx066 squareroot -10.0        -> NaN Invalid_operation
sqtx067 squareroot -10.00       -> NaN Invalid_operation
sqtx068 squareroot -100.0       -> NaN Invalid_operation
sqtx069 squareroot -100.00      -> NaN Invalid_operation
sqtx070 squareroot -1.1000E+3   -> NaN Invalid_operation
sqtx071 squareroot -1.10000E+3  -> NaN Invalid_operation

-- famous squares
sqtx080 squareroot     1  -> 1
sqtx081 squareroot     4  -> 2
sqtx082 squareroot     9  -> 3
sqtx083 squareroot    16  -> 4
sqtx084 squareroot    25  -> 5
sqtx085 squareroot    36  -> 6
sqtx086 squareroot    49  -> 7
sqtx087 squareroot    64  -> 8
sqtx088 squareroot    81  -> 9
sqtx089 squareroot   100  -> 1E+1 Rounded
sqtx090 squareroot   121  -> 11
sqtx091 squareroot   144  -> 12
sqtx092 squareroot   169  -> 13
sqtx093 squareroot   256  -> 16
sqtx094 squareroot  1024  -> 32
sqtx095 squareroot  4096  -> 64
sqtx100 squareroot   0.01 -> 0.1
sqtx101 squareroot   0.04 -> 0.2
sqtx102 squareroot   0.09 -> 0.3
sqtx103 squareroot   0.16 -> 0.4
sqtx104 squareroot   0.25 -> 0.5
sqtx105 squareroot   0.36 -> 0.6
sqtx106 squareroot   0.49 -> 0.7
sqtx107 squareroot   0.64 -> 0.8
sqtx108 squareroot   0.81 -> 0.9
sqtx109 squareroot   1.00 -> 1 Rounded
sqtx110 squareroot   1.21 -> 1.1
sqtx111 squareroot   1.44 -> 1.2
sqtx112 squareroot   1.69 -> 1.3
sqtx113 squareroot   2.56 -> 1.6
sqtx114 squareroot  10.24 -> 3.2
sqtx115 squareroot  40.96 -> 6.4

-- Precision 1 squareroot tests [exhaustive, plus exponent adjusts]
rounding:    half_even
maxExponent: 999
precision:   1
sqtx1201 squareroot 0.1 -> 0.3  Inexact Rounded
sqtx1202 squareroot 0.01 -> 0.1
sqtx1203 squareroot 1.0E-1 -> 0.3  Inexact Rounded
sqtx1204 squareroot 1.00E-2 -> 0.1  Rounded
sqtx1205 squareroot 1E-3 -> 0.03  Inexact Rounded
sqtx1206 squareroot 1E+1 -> 3  Inexact Rounded
sqtx1207 squareroot 1E+2 -> 1E+1
sqtx1208 squareroot 1E+3 -> 3E+1  Inexact Rounded
sqtx1209 squareroot 0.2 -> 0.4  Inexact Rounded
sqtx1210 squareroot 0.02 -> 0.1  Inexact Rounded
sqtx1211 squareroot 2.0E-1 -> 0.4  Inexact Rounded
sqtx1212 squareroot 2.00E-2 -> 0.1  Inexact Rounded
sqtx1213 squareroot 2E-3 -> 0.04  Inexact Rounded
sqtx1214 squareroot 2E+1 -> 4  Inexact Rounded
sqtx1215 squareroot 2E+2 -> 1E+1  Inexact Rounded
sqtx1216 squareroot 2E+3 -> 4E+1  Inexact Rounded
sqtx1217 squareroot 0.3 -> 0.5  Inexact Rounded
sqtx1218 squareroot 0.03 -> 0.2  Inexact Rounded
sqtx1219 squareroot 3.0E-1 -> 0.5  Inexact Rounded
sqtx1220 squareroot 3.00E-2 -> 0.2  Inexact Rounded
sqtx1221 squareroot 3E-3 -> 0.05  Inexact Rounded
sqtx1222 squareroot 3E+1 -> 5  Inexact Rounded
sqtx1223 squareroot 3E+2 -> 2E+1  Inexact Rounded
sqtx1224 squareroot 3E+3 -> 5E+1  Inexact Rounded
sqtx1225 squareroot 0.4 -> 0.6  Inexact Rounded
sqtx1226 squareroot 0.04 -> 0.2
sqtx1227 squareroot 4.0E-1 -> 0.6  Inexact Rounded
sqtx1228 squareroot 4.00E-2 -> 0.2  Rounded
sqtx1229 squareroot 4E-3 -> 0.06  Inexact Rounded
sqtx1230 squareroot 4E+1 -> 6  Inexact Rounded
sqtx1231 squareroot 4E+2 -> 2E+1
sqtx1232 squareroot 4E+3 -> 6E+1  Inexact Rounded
sqtx1233 squareroot 0.5 -> 0.7  Inexact Rounded
sqtx1234 squareroot 0.05 -> 0.2  Inexact Rounded
sqtx1235 squareroot 5.0E-1 -> 0.7  Inexact Rounded
sqtx1236 squareroot 5.00E-2 -> 0.2  Inexact Rounded
sqtx1237 squareroot 5E-3 -> 0.07  Inexact Rounded
sqtx1238 squareroot 5E+1 -> 7  Inexact Rounded
sqtx1239 squareroot 5E+2 -> 2E+1  Inexact Rounded
sqtx1240 squareroot 5E+3 -> 7E+1  Inexact Rounded
sqtx1241 squareroot 0.6 -> 0.8  Inexact Rounded
sqtx1242 squareroot 0.06 -> 0.2  Inexact Rounded
sqtx1243 squareroot 6.0E-1 -> 0.8  Inexact Rounded
sqtx1244 squareroot 6.00E-2 -> 0.2  Inexact Rounded
sqtx1245 squareroot 6E-3 -> 0.08  Inexact Rounded
sqtx1246 squareroot 6E+1 -> 8  Inexact Rounded
sqtx1247 squareroot 6E+2 -> 2E+1  Inexact Rounded
sqtx1248 squareroot 6E+3 -> 8E+1  Inexact Rounded
sqtx1249 squareroot 0.7 -> 0.8  Inexact Rounded
sqtx1250 squareroot 0.07 -> 0.3  Inexact Rounded
sqtx1251 squareroot 7.0E-1 -> 0.8  Inexact Rounded
sqtx1252 squareroot 7.00E-2 -> 0.3  Inexact Rounded
sqtx1253 squareroot 7E-3 -> 0.08  Inexact Rounded
sqtx1254 squareroot 7E+1 -> 8  Inexact Rounded
sqtx1255 squareroot 7E+2 -> 3E+1  Inexact Rounded
sqtx1256 squareroot 7E+3 -> 8E+1  Inexact Rounded
sqtx1257 squareroot 0.8 -> 0.9  Inexact Rounded
sqtx1258 squareroot 0.08 -> 0.3  Inexact Rounded
sqtx1259 squareroot 8.0E-1 -> 0.9  Inexact Rounded
sqtx1260 squareroot 8.00E-2 -> 0.3  Inexact Rounded
sqtx1261 squareroot 8E-3 -> 0.09  Inexact Rounded
sqtx1262 squareroot 8E+1 -> 9  Inexact Rounded
sqtx1263 squareroot 8E+2 -> 3E+1  Inexact Rounded
sqtx1264 squareroot 8E+3 -> 9E+1  Inexact Rounded
sqtx1265 squareroot 0.9 -> 0.9  Inexact Rounded
sqtx1266 squareroot 0.09 -> 0.3
sqtx1267 squareroot 9.0E-1 -> 0.9  Inexact Rounded
sqtx1268 squareroot 9.00E-2 -> 0.3  Rounded
sqtx1269 squareroot 9E-3 -> 0.09  Inexact Rounded
sqtx1270 squareroot 9E+1 -> 9  Inexact Rounded
sqtx1271 squareroot 9E+2 -> 3E+1
sqtx1272 squareroot 9E+3 -> 9E+1  Inexact Rounded

-- Precision 2 squareroot tests [exhaustive, plus exponent adjusts]
rounding:    half_even
maxExponent: 999
precision:   2
sqtx2201 squareroot 0.1 -> 0.32  Inexact Rounded
sqtx2202 squareroot 0.01 -> 0.1
sqtx2203 squareroot 1.0E-1 -> 0.32  Inexact Rounded
sqtx2204 squareroot 1.00E-2 -> 0.1  Rounded
sqtx2205 squareroot 1E-3 -> 0.032  Inexact Rounded
sqtx2206 squareroot 1E+1 -> 3.2  Inexact Rounded
sqtx2207 squareroot 1E+2 -> 1E+1
sqtx2208 squareroot 1E+3 -> 32  Inexact Rounded
sqtx2209 squareroot 0.2 -> 0.45  Inexact Rounded
sqtx2210 squareroot 0.02 -> 0.14  Inexact Rounded
sqtx2211 squareroot 2.0E-1 -> 0.45  Inexact Rounded
sqtx2212 squareroot 2.00E-2 -> 0.14  Inexact Rounded
sqtx2213 squareroot 2E-3 -> 0.045  Inexact Rounded
sqtx2214 squareroot 2E+1 -> 4.5  Inexact Rounded
sqtx2215 squareroot 2E+2 -> 14  Inexact Rounded
sqtx2216 squareroot 2E+3 -> 45  Inexact Rounded
sqtx2217 squareroot 0.3 -> 0.55  Inexact Rounded
sqtx2218 squareroot 0.03 -> 0.17  Inexact Rounded
sqtx2219 squareroot 3.0E-1 -> 0.55  Inexact Rounded
sqtx2220 squareroot 3.00E-2 -> 0.17  Inexact Rounded
sqtx2221 squareroot 3E-3 -> 0.055  Inexact Rounded
sqtx2222 squareroot 3E+1 -> 5.5  Inexact Rounded
sqtx2223 squareroot 3E+2 -> 17  Inexact Rounded
sqtx2224 squareroot 3E+3 -> 55  Inexact Rounded
sqtx2225 squareroot 0.4 -> 0.63  Inexact Rounded
sqtx2226 squareroot 0.04 -> 0.2
sqtx2227 squareroot 4.0E-1 -> 0.63  Inexact Rounded
sqtx2228 squareroot 4.00E-2 -> 0.2  Rounded
sqtx2229 squareroot 4E-3 -> 0.063  Inexact Rounded
sqtx2230 squareroot 4E+1 -> 6.3  Inexact Rounded
sqtx2231 squareroot 4E+2 -> 2E+1
sqtx2232 squareroot 4E+3 -> 63  Inexact Rounded
sqtx2233 squareroot 0.5 -> 0.71  Inexact Rounded
sqtx2234 squareroot 0.05 -> 0.22  Inexact Rounded
sqtx2235 squareroot 5.0E-1 -> 0.71  Inexact Rounded
sqtx2236 squareroot 5.00E-2 -> 0.22  Inexact Rounded
sqtx2237 squareroot 5E-3 -> 0.071  Inexact Rounded
sqtx2238 squareroot 5E+1 -> 7.1  Inexact Rounded
sqtx2239 squareroot 5E+2 -> 22  Inexact Rounded
sqtx2240 squareroot 5E+3 -> 71  Inexact Rounded
sqtx2241 squareroot 0.6 -> 0.77  Inexact Rounded
sqtx2242 squareroot 0.06 -> 0.24  Inexact Rounded
sqtx2243 squareroot 6.0E-1 -> 0.77  Inexact Rounded
sqtx2244 squareroot 6.00E-2 -> 0.24  Inexact Rounded
sqtx2245 squareroot 6E-3 -> 0.077  Inexact Rounded
sqtx2246 squareroot 6E+1 -> 7.7  Inexact Rounded
sqtx2247 squareroot 6E+2 -> 24  Inexact Rounded
sqtx2248 squareroot 6E+3 -> 77  Inexact Rounded
sqtx2249 squareroot 0.7 -> 0.84  Inexact Rounded
sqtx2250 squareroot 0.07 -> 0.26  Inexact Rounded
sqtx2251 squareroot 7.0E-1 -> 0.84  Inexact Rounded
sqtx2252 squareroot 7.00E-2 -> 0.26  Inexact Rounded
sqtx2253 squareroot 7E-3 -> 0.084  Inexact Rounded

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -