• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- nextminus.decTest -- decimal next that is less [754r nextdown]     --
3-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
4------------------------------------------------------------------------
5-- Please see the document "General Decimal Arithmetic Testcases"     --
6-- at http://www2.hursley.ibm.com/decimal for the description of      --
7-- these testcases.                                                   --
8--                                                                    --
9-- These testcases are experimental ('beta' versions), and they       --
10-- may contain errors.  They are offered on an as-is basis.  In       --
11-- particular, achieving the same results as the tests here is not    --
12-- a guarantee that an implementation complies with any Standard      --
13-- or specification.  The tests are not exhaustive.                   --
14--                                                                    --
15-- Please send comments, suggestions, and corrections to the author:  --
16--   Mike Cowlishaw, IBM Fellow                                       --
17--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
18--   mfc@uk.ibm.com                                                   --
19------------------------------------------------------------------------
20version: 2.59
21
22extended:    1
23precision:   9
24rounding:    half_up
25maxExponent: 384
26minexponent: -383
27
28nextm001 nextminus  0.999999995 ->   0.999999994
29nextm002 nextminus  0.999999996 ->   0.999999995
30nextm003 nextminus  0.999999997 ->   0.999999996
31nextm004 nextminus  0.999999998 ->   0.999999997
32nextm005 nextminus  0.999999999 ->   0.999999998
33nextm006 nextminus  1.00000000  ->   0.999999999
34nextm007 nextminus  1.0         ->   0.999999999
35nextm008 nextminus  1           ->   0.999999999
36nextm009 nextminus  1.00000001  ->   1.00000000
37nextm010 nextminus  1.00000002  ->   1.00000001
38nextm011 nextminus  1.00000003  ->   1.00000002
39nextm012 nextminus  1.00000004  ->   1.00000003
40nextm013 nextminus  1.00000005  ->   1.00000004
41nextm014 nextminus  1.00000006  ->   1.00000005
42nextm015 nextminus  1.00000007  ->   1.00000006
43nextm016 nextminus  1.00000008  ->   1.00000007
44nextm017 nextminus  1.00000009  ->   1.00000008
45nextm018 nextminus  1.00000010  ->   1.00000009
46nextm019 nextminus  1.00000011  ->   1.00000010
47nextm020 nextminus  1.00000012  ->   1.00000011
48
49nextm021 nextminus -0.999999995 ->  -0.999999996
50nextm022 nextminus -0.999999996 ->  -0.999999997
51nextm023 nextminus -0.999999997 ->  -0.999999998
52nextm024 nextminus -0.999999998 ->  -0.999999999
53nextm025 nextminus -0.999999999 ->  -1.00000000
54nextm026 nextminus -1.00000000  ->  -1.00000001
55nextm027 nextminus -1.0         ->  -1.00000001
56nextm028 nextminus -1           ->  -1.00000001
57nextm029 nextminus -1.00000001  ->  -1.00000002
58nextm030 nextminus -1.00000002  ->  -1.00000003
59nextm031 nextminus -1.00000003  ->  -1.00000004
60nextm032 nextminus -1.00000004  ->  -1.00000005
61nextm033 nextminus -1.00000005  ->  -1.00000006
62nextm034 nextminus -1.00000006  ->  -1.00000007
63nextm035 nextminus -1.00000007  ->  -1.00000008
64nextm036 nextminus -1.00000008  ->  -1.00000009
65nextm037 nextminus -1.00000009  ->  -1.00000010
66nextm038 nextminus -1.00000010  ->  -1.00000011
67nextm039 nextminus -1.00000011  ->  -1.00000012
68
69-- input operand is >precision
70nextm041 nextminus  1.00000010998  ->   1.00000010
71nextm042 nextminus  1.00000010999  ->   1.00000010
72nextm043 nextminus  1.00000011000  ->   1.00000010
73nextm044 nextminus  1.00000011001  ->   1.00000011
74nextm045 nextminus  1.00000011002  ->   1.00000011
75nextm046 nextminus  1.00000011002  ->   1.00000011
76nextm047 nextminus  1.00000011052  ->   1.00000011
77nextm048 nextminus  1.00000011552  ->   1.00000011
78nextm049 nextminus -1.00000010998  ->  -1.00000011
79nextm050 nextminus -1.00000010999  ->  -1.00000011
80nextm051 nextminus -1.00000011000  ->  -1.00000012
81nextm052 nextminus -1.00000011001  ->  -1.00000012
82nextm053 nextminus -1.00000011002  ->  -1.00000012
83nextm054 nextminus -1.00000011002  ->  -1.00000012
84nextm055 nextminus -1.00000011052  ->  -1.00000012
85nextm056 nextminus -1.00000011552  ->  -1.00000012
86-- ultra-tiny inputs
87nextm060 nextminus  1E-99999       ->   0E-391
88nextm061 nextminus  1E-999999999   ->   0E-391
89nextm062 nextminus  1E-391         ->   0E-391
90nextm063 nextminus -1E-99999       ->  -1E-391
91nextm064 nextminus -1E-999999999   ->  -1E-391
92nextm065 nextminus -1E-391         ->  -2E-391
93
94-- Zeros
95nextm100 nextminus -0           -> -1E-391
96nextm101 nextminus  0           -> -1E-391
97nextm102 nextminus  0.00        -> -1E-391
98nextm103 nextminus -0.00        -> -1E-391
99nextm104 nextminus  0E-300      -> -1E-391
100nextm105 nextminus  0E+300      -> -1E-391
101nextm106 nextminus  0E+30000    -> -1E-391
102nextm107 nextminus -0E+30000    -> -1E-391
103
104precision: 9
105maxExponent: 999
106minexponent: -999
107-- specials
108nextm150 nextminus   Inf    ->  9.99999999E+999
109nextm151 nextminus  -Inf    -> -Infinity
110nextm152 nextminus   NaN    ->  NaN
111nextm153 nextminus  sNaN    ->  NaN   Invalid_operation
112nextm154 nextminus   NaN77  ->  NaN77
113nextm155 nextminus  sNaN88  ->  NaN88 Invalid_operation
114nextm156 nextminus  -NaN    -> -NaN
115nextm157 nextminus -sNaN    -> -NaN   Invalid_operation
116nextm158 nextminus  -NaN77  -> -NaN77
117nextm159 nextminus -sNaN88  -> -NaN88 Invalid_operation
118
119-- Nmax, Nmin, Ntiny, subnormals
120nextm170 nextminus  9.99999999E+999   -> 9.99999998E+999
121nextm171 nextminus  9.99999998E+999   -> 9.99999997E+999
122nextm172 nextminus  1E-999            -> 9.9999999E-1000
123nextm173 nextminus  1.00000000E-999   -> 9.9999999E-1000
124nextm174 nextminus  9E-1007           -> 8E-1007
125nextm175 nextminus  9.9E-1006         -> 9.8E-1006
126nextm176 nextminus  9.9999E-1003      -> 9.9998E-1003
127nextm177 nextminus  9.9999999E-1000   -> 9.9999998E-1000
128nextm178 nextminus  9.9999998E-1000   -> 9.9999997E-1000
129nextm179 nextminus  9.9999997E-1000   -> 9.9999996E-1000
130nextm180 nextminus  0E-1007           -> -1E-1007
131nextm181 nextminus  1E-1007           -> 0E-1007
132nextm182 nextminus  2E-1007           -> 1E-1007
133
134nextm183 nextminus  -0E-1007          -> -1E-1007
135nextm184 nextminus  -1E-1007          -> -2E-1007
136nextm185 nextminus  -2E-1007          -> -3E-1007
137nextm186 nextminus  -10E-1007         -> -1.1E-1006
138nextm187 nextminus  -100E-1007        -> -1.01E-1005
139nextm188 nextminus  -100000E-1007     -> -1.00001E-1002
140nextm189 nextminus  -1.0000E-999      -> -1.00000001E-999
141nextm190 nextminus  -1.00000000E-999  -> -1.00000001E-999
142nextm191 nextminus  -1E-999           -> -1.00000001E-999
143nextm192 nextminus  -9.99999998E+999  -> -9.99999999E+999
144nextm193 nextminus  -9.99999999E+999  -> -Infinity
145
146-- Null tests
147nextm900 nextminus  # -> NaN Invalid_operation
148
149