Import Upstream version 0.8.2
[platform/upstream/mpc.git] / tests / add_fr.dat
1 # Data file for mpc_add_fr.
2 #
3 # Copyright (C) 2008 Philippe Th\'eveny
4 #
5 # This file is part of the MPC Library.
6 #
7 # The MPC Library is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation; either version 2.1 of the License, or (at your
10 # option) any later version.
11 #
12 # The MPC Library is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
15 # License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with the MPC Library; see the file COPYING.LIB.  If not, write to
19 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20 # MA 02111-1307, USA.
21 #
22 # The line format respects the parameter order in function prototype as
23 # follow:
24 #
25 # INEX_RE INEX_IM PREC_ROP_RE  ROP_RE  PREC_ROP_IM  ROP_IM  PREC_OP1_RE  OP1_RE  PREC_OP1_IM  OP1_IM  PREC_OP2  OP2  RND_RE  RND_IM
26 #
27 # where op1 = op1_re + i * op1_im, rop = rop_re + i * rop_im,
28 # The data are read from the file and stored in variables op1, op2, rop using
29 # rounding to nearest when needed, for instance: rop_re is ROP_RE rounded to
30 # nearest to the precision of PREC_ROP_RE.
31 # ROP_RE is checked against Re(op1 + op2) rounded to the precision PREC_ROP_RE
32 #   in the direction RND_RE
33 # ROP_IM is checked against Im(op1) rounded to the precision PREC_ROP_IM
34 #   in the direction RND_IM
35 # INEX_RE is the ternary value for the real part with the following notation:
36 # "?" ternary value not checked
37 # "+" if ROP_RE is greater than the exact mathematical result
38 # "0" if ROP_RE is exactly the mathematical result
39 # "-" if ROP_RE is less than the exact mathematical result
40 # (m.m. INEX_IM)
41 # rounding modes notation:
42 # "N" is rounding to nearest
43 # "Z" is rounding towards zero
44 # "U" is rounding towards plus infinity
45 # "D" is rounding towards minus infinity
46 # Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
47 #   no prefix for value in base ten.
48 # In all bases, "nan" is NaN, "inf" is infinity;
49 # The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
50
51 # special values (following ISO C99 standard)
52 0 0 53 -inf 53 -inf    53 -inf 53 -inf 53 -inf N Z
53 0 0 53 -inf 53 +inf    53 -inf 53 +inf 53   -1 Z U
54 0 0 53 -inf 53   -0    53 -inf 53   -0 53   -0 U D
55 0 0 53 -inf 53   +0    53 -inf 53   +0 53   +0 D N
56 0 0 53 -inf 53   -1    53 -inf 53   -1 53   +1 N U
57 0 0 53  nan 53   +1    53 -inf 53   +1 53 +inf Z D
58 0 0 53  nan 53  nan    53 -inf 53  nan 53  nan U N
59
60 0 0 53 -inf 53 +inf    53   -1 53 +inf 53 -inf N Z
61 0 0 53   -2 53   -0    53   -1 53   -0 53   -1 Z U
62 0 0 53   -1 53   +0    53   -1 53   +0 53   -0 U D
63 0 0 53   -1 53   -1    53   -1 53   -1 53   +0 D N
64 0 0 53   +0 53   +1    53   -1 53   +1 53   +1 N U
65 0 0 53 +inf 53  nan    53   -1 53  nan 53 +inf Z D
66 0 0 53  nan 53 -inf    53   -1 53 -inf 53  nan U N
67
68 0 0 53 -inf 53   -0    53   -0 53   -0 53 -inf N Z
69 0 0 53   -1 53   +0    53   -0 53   +0 53   -1 Z U
70 0 0 53   -0 53   -1    53   -0 53   -1 53   -0 U D
71 0 0 53   -0 53   +1    53   -0 53   +1 53   +0 D N
72 0 0 53   +1 53  nan    53   -0 53  nan 53   +1 N U
73 0 0 53 +inf 53 -inf    53   -0 53 -inf 53 +inf Z D
74 0 0 53  nan 53 +inf    53   -0 53 +inf 53  nan U N
75
76 0 0 53 -inf 53   +0    53   +0 53   +0 53 -inf N Z
77 0 0 53   -1 53   -1    53   +0 53   -1 53   -1 Z U
78 0 0 53   +0 53   +1    53   +0 53   +1 53   -0 U D
79 0 0 53   +0 53  nan    53   +0 53  nan 53   +0 D N
80 0 0 53   +1 53 -inf    53   +0 53 -inf 53   +1 N U
81 0 0 53 +inf 53 +inf    53   +0 53 +inf 53 +inf Z D
82 0 0 53  nan 53   -0    53   +0 53   -0 53  nan U N
83
84 0 0 53 -inf 53   -1    53   +1 53   -1 53 -inf N Z
85 0 0 53   +0 53   +1    53   +1 53   +1 53   -1 Z U
86 0 0 53   +1 53  nan    53   +1 53  nan 53   -0 U D
87 0 0 53   +1 53 -inf    53   +1 53 -inf 53   +0 D N
88 0 0 53   +2 53 +inf    53   +1 53 +inf 53   +1 N U
89 0 0 53 +inf 53   -0    53   +1 53   -0 53 +inf Z D
90 0 0 53  nan 53   +0    53   +1 53   +0 53  nan U N
91
92 0 0 53  nan 53   +1    53 +inf 53   +1 53 -inf N Z
93 0 0 53 +inf 53  nan    53 +inf 53  nan 53   -1 Z U
94 0 0 53 +inf 53 -inf    53 +inf 53 -inf 53   -0 U D
95 0 0 53 +inf 53 +inf    53 +inf 53 +inf 53   +0 D N
96 0 0 53 +inf 53   -0    53 +inf 53   -0 53   +1 N U
97 0 0 53 +inf 53   +0    53 +inf 53   +0 53 +inf Z D
98 0 0 53  nan 53   -1    53 +inf 53   -1 53  nan U N
99
100 0 0 53  nan 53  nan    53  nan 53  nan 53 -inf N Z
101 0 0 53  nan 53 -inf    53  nan 53 -inf 53   -1 Z U
102 0 0 53  nan 53 +inf    53  nan 53 +inf 53   -0 U D
103 0 0 53  nan 53   -0    53  nan 53   -0 53   +0 D N
104 0 0 53  nan 53   +0    53  nan 53   +0 53   +1 N U
105 0 0 53  nan 53   -1    53  nan 53   -1 53 +inf Z D
106 0 0 53  nan 53   +1    53  nan 53   +1 53  nan U N
107
108 # pure real argument
109 - 0 53  0x10000000000000p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-106 N N
110 + 0 53  0x10000000000001p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-105 N N
111 - 0 53  0x10000000000001p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-104 N N
112 - 0 53  0x10000000000000p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-105 Z Z
113 + 0 53  0x10000000000001p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-105 U U
114 - 0 53  0x10000000000000p-52  53 -0    53 +1 53 -0 53 0x10000000000001p-105 D D
115
116 # pure imaginary argument
117 0 0 53 +1 53 +1     53 -0 53 1 53 +1 N N
118 0 0 53 +1 53 +1     53 +0 53 1 53 +1 Z Z
119 0 0 53 +1 53 +1     53 +0 53 1 53 +1 U U
120 0 0 53 +1 53 +1     53 -0 53 1 53 +1 D D
121