resetting manifest requested domain to floor
[platform/upstream/mpc.git] / tests / inp_str.dat
1 # Data file for mpc_inp_str.
2 #
3 # Copyright (C) 2009 INRIA
4 #
5 # This file is part of GNU MPC.
6 #
7 # GNU MPC is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU Lesser General Public License as published by the
9 # Free Software Foundation; either version 3 of the License, or (at your
10 #o ption) any later version.
11 #
12 # GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 # more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with this program. If not, see http://www.gnu.org/licenses/ .
19 #
20 # The format respects the parameter order in function prototype as follow:
21 #
22 # INEX_RE INEX_IM PREC_ROP_RE  ROP_RE  PREC_ROP_IM  ROP_IM  SIZE  BASE  RND_RE  RND_IM  "STRING"
23 #
24 # The string STRING is considered as a complex number rop = rop1 + i*rop2
25 # written in base BASE as "rop1 " if rop is real or "(rop1 rop2)". Notice that
26 # a least one whitespace is required after real part
27 #
28 # ROP_RE is checked against rop1 rounded to the precision PREC_ROP_RE
29 #   in the direction RND_RE
30 # ROP_IM is checked against rop2 rounded to the precision PREC_ROP_IM
31 #   in the direction RND_IM
32 # INEX_RE is the ternary value for the real part with the following notation:
33 # "?" ternary value not checked
34 # "!" function should return error indicator -1
35 # "+" if ROP_RE is greater than the exact mathematical result
36 # "0" if ROP_RE is exactly the mathematical result
37 # "-" if ROP_RE is less than the exact mathematical result
38 # (m.m. INEX_IM)
39 # rounding modes notation:
40 # "N" is rounding to nearest
41 # "Z" is rounding towards zero
42 # "U" is rounding towards plus infinity
43 # "D" is rounding towards minus infinity
44 # Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
45 #   no prefix for value in base ten.
46 # In all bases, "nan" is NaN, "inf" is infinity;
47 # The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
48
49 # invalid strings
50 ! ! 53  nan 53  nan      3 10 N N  "non "
51 ! ! 53  nan 53  nan      4 10 N N  " NON "
52 ! ! 53  nan 53  nan      5 10 N N  "nan(0 1) " #invalid space in brackets
53 ! ! 53  nan 53  nan      5 10 N N  "nan(0-1) " #invalid char in brackets
54 ! ! 53  nan 53  nan      4 10 N N  "NaN((keepout)) " #two levels of parenthesis
55 ! ! 53  nan 53  nan      4 10 N N  "(1e1) " #one part missing
56 ! ! 53  nan 53  nan      1 10 N N  ". "     #no digit
57 ! ! 53  nan 53  nan      2  2 N N  "+3 "    #invalid binary digit
58 ! ! 53  nan 53  nan      6 10 N N  "( +INF) " #one part missing
59 ! ! 53  nan 53  nan      2 10 N N  "(1(1))" #too many levels of parentheses
60 ! ! 53  nan 53  nan      3 10 N N  "(1 (1 (1 0)))"
61 ! ! 53  nan 53  nan      1 10 N N  "((1 1)) "
62 ! ! 53  nan 53  nan      6 10 N N  "(1 +1 " #closing parenthesis missing
63 ! ! 53  nan 53  nan      4 10 N N  "(1+1) " #space needed
64 ! ! 53  nan 53  nan      5 10 N N  "(1 + 1) " #space after sign
65 ! ! 53  nan 53  nan     17 10 N N  "(@nan@(quiet)  0 " #closing parenthesis missing
66 ! ! 53  nan 53  nan      4 10 N N  "zero "  #invalid digits
67 ! ! 53  nan 53  nan      3 10 N N  "&^+ "   #invalid digits
68 ! ! 53  nan 53  nan      1 18 N N  "i "     #invalid digit
69 ! ! 53  nan 53  nan      1 18 N N  "I "     #invalid digit
70 ! ! 53  nan 53  nan      1 35 N N  "z "     #invalid digit
71 ! ! 53  nan 53  nan      1 35 N N  "Z "     #invalid digit
72 ! ! 53  nan 53  nan      5 18 N N  "(i 0) " #invalid digit
73 ! ! 53  nan 53  nan      5 18 N N  "(I 0) " #invalid digit
74 ! ! 53  nan 53  nan      5 35 N N  "(z 0) " #invalid digit
75 ! ! 53  nan 53  nan      5 35 N N  "(Z 0) " #invalid digit
76 ! ! 53  nan 53  nan      5 18 N N  "(0 i) " #invalid digit
77 ! ! 53  nan 53  nan      5 18 N N  "(0 I) " #invalid digit
78 ! ! 53  nan 53  nan      5 35 N N  "(0 z) " #invalid digit
79 ! ! 53  nan 53  nan      5 35 N N  "(0 Z) " #invalid digit
80 ! ! 53  nan 53  nan      7 10 N N  "-25p+32 " #invalid exponent char in base 10
81 ! ! 53  nan 53  nan      6 10 N N  "0xabcd  " #invalid prefix in base 10
82 ! ! 53  nan 53  nan      6 10 N N  "+0b010 "  #invalid prefix in base 10
83
84 # special values
85 0 0 53  nan 53   +0      3 10 N N  "nan "
86 0 0 53  nan 53   +0      4 10 N N  "+NAN "
87 0 0 53  nan 53   +0      5 10 N N  "@NAN@ "
88 0 0 53  nan 53  nan     18 10 N N  "(@nan@(QUIET) nan) "
89 0 0 53  nan 53   +0      5 10 N N  "@nan@ "
90 0 0 53  nan 53   +0     12 10 N N  "NaN(keepout) "
91 0 0 53  nan 53   +0    122 10 N N  "Nan(very_long_suffix_oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo) "
92 0 0 53  nan 53   +0      8 10 N N  "nan(0_1) "
93 0 0 53  nan 53   +0      3 10 N N  "nan "
94 0 0 53  inf 53   +0      3 10 N N  "inf "
95 0 0 53 -inf 53   +0      4 10 N N  "-inf "
96 0 0 53 +inf 53   +0      8 10 N N  "infinity "
97 0 0 53 +inf 53   +0      4 10 N N  "+INF "
98 0 0 53   +0 53 +inf      8 10 N N  "(0 +inf) "
99 0 0 53   +0 53 +inf     12 10 N N  "(+0     INF) "
100 0 0 53   +0 53 -inf     13 10 N N  "(0 -infinity) "
101 0 0 53   +0 53 -inf      9 10 N N  "(+0 -INF) "
102 0 0 53 -inf 53   -0     11 10 N N  "(-@inf@ -0) "
103 0 0 53 +inf 53  nan     17 10 N N  "(+inf nan(9u137)) "
104 0 0 53  nan 53 +inf     12 10 N N  "(NaN  +inf ) "
105
106 # pure real argument
107 0 0 53                     +0 53 +0       1 10 N N  "0 "
108 0 0 53                     +0 53 +0       5 10 N N  "00000 "
109 0 0 53                     +0 53 +0       2 10 N N  "+0 "
110 0 0 53                     -0 53 +0       2 10 N N  "-0 "
111 0 0 53                     +1 53 +0       1 10 N N  "1 "
112 0 0 53                     +1 53 +0       3 10 N N  "001 "
113 0 0 53                     +1 53 +0       6 10 N N  "1.0000 "
114 0 0 53                     +1 53 +0       2 10 N N  "+1) "
115 - 0 53   +0x9D70A3D70A3D7p-51 53 +0      11 10 N N  "(+1.23 0.0) "
116 0 0 53                    -10 53 +0      11 10 N N  "(-10. 0000) "
117 0 0 53                +0x5p-3 53 -0      12 10 N N  "( .625  -0 )"
118 - 0 53 +0x14E718D7D7625Ap+612 53 +0      10 10 N N  "(1e200  0) "
119 + 0 53 +0x14E718D7D7625Bp+612 53 +0      10 10 U N  "(1e200  0) "
120 - 0 53 +0x14E718D7D7625Ap+612 53 +0      10 10 D N  "(1e200  0) "
121 0 0 53                +0x7530 53 +0       8 10 N N  "(3e+4 0) "
122 - 0 53  +0x10C6F7A0B5ED8Dp-73 53 +0       5 10 N N  ".5e-6 "
123 - 0 53  +0x1B1C1E0D914133p-83 53 +0      12 10 N N  "(7.89E-10 0) "
124 + 0 53  -0x7B426FAB61F00Cp+56 53 +0       7 10 N N  "-25@+32 "
125 0 0 53                 +43981 53 +0       6 16 N N  "0xabcd "
126 0 0 53                     +2 53 +0       6  2 N N  "+0b010 "
127 0 0 53                    +18 53 +0       1 20 N N  "i "
128 0 0 53                    +18 53 +0       1 19 N N  "i "
129 0 0 53                    +35 53 +0       1 36 N N  "z "
130 0 0 53                    +35 53 +0       1 36 N N  "Z "
131
132 # pure imaginary argument
133 0 0 53 +0 53                     +1       5 10 N N  "(0 1) "
134 0 0 53 +0 53                     +1       6 20 N N  "(0 +1) "
135 0 0 53 -0 53                     -1       7 10 N N  "(-0 -1) "
136 0 0 53 -0 53                     -2       7 10 N N  "(-0 -2) "
137 0 0 53 +0 53                     +2       6 10 N N  "(+0 2) "
138 0 0 53 +0 53                    +17       5 20 N N  "(0 h) "
139 0 0 53 +0 53                    +18       5 20 N N  "(0 i) "
140 0 + 53 +0 53  -0x14F800008637BDp-44      19 10 N Z  "(0 -33.55000005e+1) "
141 0 + 53 +0 53  -0xA1765976008AFp-401      18 10 N U  "(+0 -.550000E-105) "
142 0 0 53 +0 53                    +18       5 19 N N  "(0 i) "
143 0 0 53 +0 53                    +18       5 19 N N  "(0 I) "
144 0 0 53 +0 53                    +35       5 36 N N  "(0 z) "
145 0 0 53 +0 53                    +35       5 36 N N  "(0 Z) "
146
147 # complex argument
148 0 0 53            +1 53          +1      10 10 N N  "(  1   +1) "
149 0 0 53            +1 53          +1       8 10 N N  "(1   +1) "
150 0 0 53            +7 53         +14       7 10 N N  "(7  14) "
151 0 0 53           +17 53          +1       7 10 N N  "(+17 1) "
152 0 0 53           +27 53          +1       8 20 N N  "(+17 +1) "
153 0 0 53           -18 53          -1       7 20 N N  "(-i -1) "
154 0 0 53           +18 53          -1       6 20 N N  "(i -1) "
155 0 0 53           -18 53          +1       7 20 N N  "(-i +1) "
156 0 0 53           +18 53         +18       6 20 N N  "(i +i) "
157 0 0 53        -14643 53      +20328      10 36 N N  "(-bar foo) "
158 0 0 53      -1647190 53     -512315      13 36 N N  "(-zaza -azaz) "
159 0 0 53       +0b1010 53     +0xabcd      16  0 N N  "(0b1010 +0xabcd) "
160 0 0 53       +0xabcd 53     +0b1010      22  0 N N  "(+0xa.bcd@+3 0b.101p4) "
161
162 # white space before the closing ')'
163 0 0 53            +1 53          +1      13 10 N N  "(  1   +1   ) "