1 # Data file for mpc_add.
3 # Copyright (C) 2008 INRIA
5 # This file is part of GNU MPC.
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.
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
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/ .
20 # The line format respects the parameter order in function prototype as
23 # 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_RE OP2_RE PREC_OP2_IM OP2_IM RND_RE RND_IM
25 # where op1 = op1_re + i * op1_im, op2 = op2_re + i * op2_im, rop = rop_re + i * rop_im,
26 # The data are read from the file and stored in variables op1, op2, rop using
27 # rounding to nearest when needed, for instance: rop_re is ROP_RE rounded to
28 # nearest to the precision of PREC_ROP_RE.
29 # ROP_RE is checked against Re(op1 + op2) rounded to the precision PREC_ROP_RE
30 # in the direction RND_RE
31 # ROP_IM is checked against Im(op1 + op2) rounded to the precision PREC_ROP_IM
32 # in the direction RND_IM
33 # INEX_RE is the ternary value for the real part with the following notation:
34 # "?" ternary value not checked
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
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".
49 # special values (following ISO C99 standard)
50 0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -inf 53 -inf N Z
51 0 0 53 -inf 53 nan 53 -inf 53 +inf 53 +1 53 -inf Z U
52 0 0 53 +inf 53 -inf 53 +inf 53 -inf 53 +inf 53 +0 U D
53 0 0 53 +inf 53 +inf 53 +inf 53 +inf 53 -0 53 -1 D N
54 0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -0 53 -1 N U
55 0 0 53 nan 53 nan 53 -inf 53 +inf 53 +inf 53 nan Z D # check this is true in ISO C99
56 0 0 53 nan 53 -inf 53 +inf 53 -inf 53 nan 53 -1 U N
57 0 0 53 +inf 53 nan 53 +inf 53 +inf 53 -0 53 nan D Z
58 0 0 53 nan 53 nan 53 -inf 53 -inf 53 nan 53 nan N D
60 0 0 53 +inf 53 -inf 53 -1 53 -inf 53 +inf 53 -1 N D
61 0 0 53 nan 53 +1 53 -inf 53 +1 53 +inf 53 -0 Z N
62 0 0 53 +1 53 -inf 53 +1 53 -inf 53 -0 53 +1 U Z
63 0 0 53 +inf 53 +1 53 +inf 53 +1 53 -0 53 -0 D U
64 0 0 53 +inf 53 nan 53 -1 53 -inf 53 +inf 53 nan N N
65 0 0 53 nan 53 +2 53 -inf 53 +1 53 nan 53 +1 Z Z
66 0 0 53 +1 53 nan 53 +1 53 -inf 53 -0 53 nan U U # check this
67 0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 nan D D
69 0 0 53 -0 53 nan 53 -0 53 -inf 53 +0 53 +inf D D
70 0 0 53 -inf 53 +0 53 -inf 53 +0 53 +1 53 -0 N Z
71 0 0 53 +0 53 -inf 53 +0 53 -inf 53 -0 53 -0 Z U
72 0 0 53 nan 53 nan 53 +inf 53 +0 53 -inf 53 nan U D # check
73 0 0 53 nan 53 -inf 53 -0 53 -inf 53 nan 53 -1 D N
74 0 0 53 -inf 53 nan 53 -inf 53 +0 53 +0 53 nan N U
75 0 0 53 nan 53 nan 53 +0 53 -inf 53 nan 53 nan Z D
77 0 0 53 +0 53 -0 53 +0 53 +1 53 -0 53 -1 Z D
78 0 0 53 -1 53 -0 53 -1 53 -0 53 +0 53 -0 U N
79 0 0 53 nan 53 +inf 53 -0 53 +1 53 nan 53 +inf D Z
80 0 0 53 +0 53 nan 53 +1 53 -0 53 -1 53 nan N D
81 0 0 53 nan 53 +1 53 +0 53 +1 53 nan 53 -0 Z N
82 0 0 53 nan 53 nan 53 -1 53 -0 53 nan 53 nan U Z
84 0 0 53 +0 53 +0 53 -0 53 +0 53 +0 53 -0 U Z
85 0 0 53 nan 53 -inf 53 +0 53 -0 53 nan 53 -inf D U
86 0 0 53 -1 53 nan 53 +0 53 +0 53 -1 53 nan N N
87 0 0 53 nan 53 -0 53 -0 53 -0 53 nan 53 -0 Z Z
88 0 0 53 nan 53 nan 53 -0 53 +0 53 nan 53 nan U U
90 0 0 53 nan 53 nan 53 nan 53 -inf 53 nan 53 +inf U U # check
91 0 0 53 +inf 53 nan 53 +inf 53 nan 53 -1 53 nan D D
92 0 0 53 nan 53 -inf 53 nan 53 -inf 53 nan 53 -0 N Z
93 0 0 53 nan 53 nan 53 -inf 53 nan 53 nan 53 nan Z U # check
95 0 0 53 nan 53 nan 53 +1 53 nan 53 nan 53 -1 Z U
96 0 0 53 nan 53 nan 53 nan 53 +1 53 -0 53 nan U D
97 0 0 53 nan 53 nan 53 -1 53 nan 53 nan 53 nan D N
99 0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 nan D N
100 0 0 53 nan 53 nan 53 +0 53 nan 53 nan 53 nan N U
102 0 0 53 nan 53 nan 53 nan 53 nan 53 nan 53 nan N U
105 + 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 N N
106 - 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 Z Z
107 + 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 U U
108 - 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 D D
110 # pure imaginary argument
111 0 + 53 -0 53 0x10000000000001p-52 53 -0 53 0x10000000000001p-105 53 -0 53 +1 N N
112 0 - 53 +0 53 0x10000000000000p-52 53 +0 53 0x10000000000001p-105 53 -0 53 +1 Z Z
113 0 + 53 +0 53 0x10000000000001p-52 53 +0 53 0x10000000000001p-105 53 -0 53 +1 U U
114 0 - 53 -0 53 0x10000000000000p-52 53 -0 53 0x10000000000001p-105 53 -0 53 +1 D D