02a9d2130efbb814204f3eab14c11d75afa07d81
[kopensolaris-gnu/glibc.git] / sysdeps / ieee754 / dbl-64 / utan.h
1
2 /*
3  * IBM Accurate Mathematical Library
4  * Copyright (c) International Business Machines Corp., 2001
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20 /******************************************************************/
21 /*                                                                */
22 /* MODULE_NAME:utan.h                                             */
23 /*                                                                */
24 /* common data and variables prototype and definition             */
25 /******************************************************************/
26
27 #ifndef UTAN_H
28 #define UTAN_H
29
30 #ifdef BIG_ENDI
31   static const number
32   /* polynomial I */
33 /**/ d3             = {{0x3FD55555, 0x55555555} }, /*  0.333... */
34 /**/ d5             = {{0x3FC11111, 0x111107C6} }, /*  0.133... */
35 /**/ d7             = {{0x3FABA1BA, 0x1CDB8745} }, /*    .      */
36 /**/ d9             = {{0x3F9664ED, 0x49CFC666} }, /*    .      */
37 /**/ d11            = {{0x3F82385A, 0x3CF2E4EA} }, /*    .      */
38   /* polynomial II */
39 /**/ a3             = {{0x3fd55555, 0x55555555} }, /*  1/3      */
40 /**/ aa3            = {{0x3c755555, 0x55555555} }, /*  1/3-a3   */
41 /**/ a5             = {{0x3fc11111, 0x11111111} }, /*  2/15     */
42 /**/ aa5            = {{0x3c411111, 0x11111111} }, /*  2/15-a5  */
43 /**/ a7             = {{0x3faba1ba, 0x1ba1ba1c} }, /*  17/315   */
44 /**/ aa7            = {{0xbc479179, 0x17917918} }, /*   ()-a7   */
45 /**/ a9             = {{0x3f9664f4, 0x882c10fa} }, /*  62/2835  */
46 /**/ aa9            = {{0xbc09a528, 0x8b6c44fd} }, /*   ()-a9   */
47 /**/ a11            = {{0x3f8226e3, 0x55e6c23d} }, /*    .      */
48 /**/ aa11           = {{0xbc2c292b, 0x8f1a2c13} }, /*    .      */
49 /**/ a13            = {{0x3f6d6d3d, 0x0e157de0} }, /*    .      */
50 /**/ aa13           = {{0xbc0280cf, 0xc968d971} }, /*    .      */
51 /**/ a15            = {{0x3f57da36, 0x452b75e3} }, /*    .      */
52 #if 0
53 /**/ aa15           = {{0xbbf25789, 0xb285d2ed} }, /*    .      */
54 #endif
55 /**/ a17            = {{0x3f435582, 0x48036744} }, /*    .      */
56 #if 0
57 /**/ aa17           = {{0x3be488d9, 0x563f1f23} }, /*    .      */
58 #endif
59 /**/ a19            = {{0x3f2f57d7, 0x734d1664} }, /*    .      */
60 #if 0
61 /**/ aa19           = {{0x3bb0d55a, 0x913ccb50} }, /*    .      */
62 #endif
63 /**/ a21            = {{0x3f1967e1, 0x8afcafad} }, /*    .      */
64 #if 0
65 /**/ aa21           = {{0xbbbd7614, 0xa42d44e6} }, /*    .      */
66 #endif
67 /**/ a23            = {{0x3f0497d8, 0xeea25259} }, /*    .      */
68 #if 0
69 /**/ aa23           = {{0x3b99f2d0, 0x2e4d2863} }, /*    .      */
70 #endif
71 /**/ a25            = {{0x3ef0b132, 0xd39a6050} }, /*    .      */
72 #if 0
73 /**/ aa25           = {{0x3b93b274, 0xc2c19614} }, /*    .      */
74 #endif
75 /**/ a27            = {{0x3edb0f72, 0xd3ee24e9} }, /*    .      */
76 #if 0
77 /**/ aa27           = {{0x3b61688d, 0xdd595609} }, /*    .      */
78 #endif
79   /* polynomial III */
80 /**/ e0             = {{0x3FD55555, 0x55554DBD} }, /*    .      */
81 /**/ e1             = {{0x3FC11112, 0xE0A6B45F} }, /*    .      */
82
83   /* constants    */
84 /**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
85 /**/ one            = {{0x3ff00000, 0x00000000} }, /* 1         */
86 /**/ mone           = {{0xbff00000, 0x00000000} }, /*-1         */
87 /**/ mfftnhf        = {{0xc02f0000, 0x00000000} }, /*-15.5      */
88 /**/ two8           = {{0x40700000, 0x00000000} }, /* 256       */
89
90 /**/ g1             = {{0x3e4b096c, 0x00000000} }, /* 1.259e-8  */
91 /**/ g2             = {{0x3faf212d, 0x00000000} }, /* 0.0608    */
92 /**/ g3             = {{0x3fe92f1a, 0x00000000} }, /* 0.787     */
93 /**/ g4             = {{0x40390000, 0x00000000} }, /* 25.0      */
94 /**/ g5             = {{0x4197d784, 0x00000000} }, /* 1e8       */
95 /**/ gy1            = {{0x3e7ad7f2, 0x9abcaf48} }, /* 1e-7      */
96 /**/ gy2            = {{0x3faf212d, 0x00000000} }, /* 0.0608    */
97
98 /**/ u1             = {{0x3cc8c33a, 0x00000000} }, /* 6.873e-16 */
99 /**/ u2             = {{0x3983dc4d, 0x00000000} }, /* 1.224e-31 */
100 /**/ u3             = {{0x3c78e14b, 0x00000000} }, /* 2.158e-17 */
101 /**/ ua3            = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
102 /**/ ub3            = {{0x3cc81898, 0x00000000} }, /* 6.688e-16 */
103 /**/ u4             = {{0x399856c2, 0x00000000} }, /* 3e-31     */
104 /**/ u5             = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
105 /**/ u6             = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
106 /**/ u7             = {{0x39903beb, 0x00000000} }, /* 2.001e-31 */
107 /**/ u8             = {{0x399c56ae, 0x00000000} }, /* 3.493e-31 */
108 /**/ u9             = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
109 /**/ ua9            = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
110 /**/ ub9            = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
111 /**/ u10            = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
112 /**/ ua10           = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
113 /**/ ub10           = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
114 /**/ u11            = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
115 /**/ u12            = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
116 /**/ u13            = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
117 /**/ u14            = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
118 /**/ u15            = {{0x3ab5767a, 0x00000000} }, /* 6.935e-26 */
119 /**/ u16            = {{0x3ab57744, 0x00000000} }, /* 6.936e-26 */
120 /**/ u17            = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
121 /**/ ua17           = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
122 /**/ ub17           = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
123 /**/ u18            = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
124 /**/ ua18           = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
125 /**/ ub18           = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
126 /**/ u19            = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
127 /**/ u20            = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
128 /**/ u21            = {{0x3c3bb9b8, 0x00000000} }, /* 1.503e-18 */
129 /**/ u22            = {{0x3c392e08, 0x00000000} }, /* 1.365e-18 */
130 /**/ u23            = {{0x3a0ce706, 0x00000000} }, /* 4.560e-29 */
131 /**/ u24            = {{0x3a0cff5d, 0x00000000} }, /* 4.575e-29 */
132 /**/ u25            = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
133 /**/ ua25           = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
134 /**/ ub25           = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
135 /**/ u26            = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
136 /**/ ua26           = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
137 /**/ ub26           = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
138 /**/ u27            = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
139 /**/ u28            = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
140
141 /**/            mp1 = {{0x3FF921FB, 0x58000000} },
142 /**/            mp2 = {{0xBE4DDE97, 0x3C000000} },
143 /**/            mp3 = {{0xBC8CB3B3, 0x99D747F2} },
144 /**/            pp3 = {{0xBC8CB3B3, 0x98000000} },
145 /**/            pp4 = {{0xbacd747f, 0x23e32ed7} },
146 /**/          hpinv = {{0x3FE45F30, 0x6DC9C883} },
147 /**/          toint = {{0x43380000, 0x00000000} };
148
149 #else
150 #ifdef LITTLE_ENDI
151
152   static const number
153   /* polynomial I */
154 /**/ d3             = {{0x55555555, 0x3FD55555} }, /*  0.333... */
155 /**/ d5             = {{0x111107C6, 0x3FC11111} }, /*  0.133... */
156 /**/ d7             = {{0x1CDB8745, 0x3FABA1BA} }, /*    .      */
157 /**/ d9             = {{0x49CFC666, 0x3F9664ED} }, /*    .      */
158 /**/ d11            = {{0x3CF2E4EA, 0x3F82385A} }, /*    .      */
159   /* polynomial II */
160 /**/ a3             = {{0x55555555, 0x3fd55555} }, /*  1/3      */
161 /**/ aa3            = {{0x55555555, 0x3c755555} }, /*  1/3-a3   */
162 /**/ a5             = {{0x11111111, 0x3fc11111} }, /*  2/15     */
163 /**/ aa5            = {{0x11111111, 0x3c411111} }, /*  2/15-a5  */
164 /**/ a7             = {{0x1ba1ba1c, 0x3faba1ba} }, /*  17/315   */
165 /**/ aa7            = {{0x17917918, 0xbc479179} }, /*   ()-a7   */
166 /**/ a9             = {{0x882c10fa, 0x3f9664f4} }, /*  62/2835  */
167 /**/ aa9            = {{0x8b6c44fd, 0xbc09a528} }, /*   ()-a9   */
168 /**/ a11            = {{0x55e6c23d, 0x3f8226e3} }, /*    .      */
169 /**/ aa11           = {{0x8f1a2c13, 0xbc2c292b} }, /*    .      */
170 /**/ a13            = {{0x0e157de0, 0x3f6d6d3d} }, /*    .      */
171 /**/ aa13           = {{0xc968d971, 0xbc0280cf} }, /*    .      */
172 /**/ a15            = {{0x452b75e3, 0x3f57da36} }, /*    .      */
173 #if 0
174 /**/ aa15           = {{0xb285d2ed, 0xbbf25789} }, /*    .      */
175 #endif
176 /**/ a17            = {{0x48036744, 0x3f435582} }, /*    .      */
177 #if 0
178 /**/ aa17           = {{0x563f1f23, 0x3be488d9} }, /*    .      */
179 #endif
180 /**/ a19            = {{0x734d1664, 0x3f2f57d7} }, /*    .      */
181 #if 0
182 /**/ aa19           = {{0x913ccb50, 0x3bb0d55a} }, /*    .      */
183 #endif
184 /**/ a21            = {{0x8afcafad, 0x3f1967e1} }, /*    .      */
185 #if 0
186 /**/ aa21           = {{0xa42d44e6, 0xbbbd7614} }, /*    .      */
187 #endif
188 /**/ a23            = {{0xeea25259, 0x3f0497d8} }, /*    .      */
189 #if 0
190 /**/ aa23           = {{0x2e4d2863, 0x3b99f2d0} }, /*    .      */
191 #endif
192 /**/ a25            = {{0xd39a6050, 0x3ef0b132} }, /*    .      */
193 #if 0
194 /**/ aa25           = {{0xc2c19614, 0x3b93b274} }, /*    .      */
195 #endif
196 /**/ a27            = {{0xd3ee24e9, 0x3edb0f72} }, /*    .      */
197 #if 0
198 /**/ aa27           = {{0xdd595609, 0x3b61688d} }, /*    .      */
199 #endif
200   /* polynomial III */
201 /**/ e0             = {{0x55554DBD, 0x3FD55555} }, /*    .      */
202 /**/ e1             = {{0xE0A6B45F, 0x3FC11112} }, /*    .      */
203
204   /* constants    */
205 /**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
206 /**/ one            = {{0x00000000, 0x3ff00000} }, /* 1         */
207 /**/ mone           = {{0x00000000, 0xbff00000} }, /*-1         */
208 /**/ mfftnhf        = {{0x00000000, 0xc02f0000} }, /*-15.5      */
209 /**/ two8           = {{0x00000000, 0x40700000} }, /* 256       */
210
211 /**/ g1             = {{0x00000000, 0x3e4b096c} }, /* 1.259e-8  */
212 /**/ g2             = {{0x00000000, 0x3faf212d} }, /* 0.0608    */
213 /**/ g3             = {{0x00000000, 0x3fe92f1a} }, /* 0.787     */
214 /**/ g4             = {{0x00000000, 0x40390000} }, /* 25.0      */
215 /**/ g5             = {{0x00000000, 0x4197d784} }, /* 1e8       */
216 /**/ gy1            = {{0x9abcaf48, 0x3e7ad7f2} }, /* 1e-7      */
217 /**/ gy2            = {{0x00000000, 0x3faf212d} }, /* 0.0608    */
218
219 /**/ u1             = {{0x00000000, 0x3cc8c33a} }, /* 6.873e-16 */
220 /**/ u2             = {{0x00000000, 0x3983dc4d} }, /* 1.224e-31 */
221 /**/ u3             = {{0x00000000, 0x3c78e14b} }, /* 2.158e-17 */
222 /**/ ua3            = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
223 /**/ ub3            = {{0x00000000, 0x3cc81898} }, /* 6.688e-16 */
224 /**/ u4             = {{0x00000000, 0x399856c2} }, /* 3e-31     */
225 /**/ u5             = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
226 /**/ u6             = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
227 /**/ u7             = {{0x00000000, 0x39903beb} }, /* 2.001e-31 */
228 /**/ u8             = {{0x00000000, 0x399c56ae} }, /* 3.493e-31 */
229 /**/ u9             = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
230 /**/ ua9            = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
231 /**/ ub9            = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
232 /**/ u10            = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
233 /**/ ua10           = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
234 /**/ ub10           = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
235 /**/ u11            = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
236 /**/ u12            = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
237 /**/ u13            = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
238 /**/ u14            = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
239 /**/ u15            = {{0x00000000, 0x3ab5767a} }, /* 6.935e-26 */
240 /**/ u16            = {{0x00000000, 0x3ab57744} }, /* 6.936e-26 */
241 /**/ u17            = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
242 /**/ ua17           = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
243 /**/ ub17           = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
244 /**/ u18            = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
245 /**/ ua18           = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
246 /**/ ub18           = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
247 /**/ u19            = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
248 /**/ u20            = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
249 /**/ u21            = {{0x00000000, 0x3c3bb9b8} }, /* 1.503e-18 */
250 /**/ u22            = {{0x00000000, 0x3c392e08} }, /* 1.365e-18 */
251 /**/ u23            = {{0x00000000, 0x3a0ce706} }, /* 4.560e-29 */
252 /**/ u24            = {{0x00000000, 0x3a0cff5d} }, /* 4.575e-29 */
253 /**/ u25            = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
254 /**/ ua25           = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
255 /**/ ub25           = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
256 /**/ u26            = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
257 /**/ ua26           = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
258 /**/ ub26           = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
259 /**/ u27            = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
260 /**/ u28            = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
261
262 /**/            mp1 = {{0x58000000, 0x3FF921FB} },
263 /**/            mp2 = {{0x3C000000, 0xBE4DDE97} },
264 /**/            mp3 = {{0x99D747F2, 0xBC8CB3B3} },
265 /**/            pp3 = {{0x98000000, 0xBC8CB3B3} },
266 /**/            pp4 = {{0x23e32ed7, 0xbacd747f} },
267 /**/          hpinv = {{0x6DC9C883, 0x3FE45F30} },
268 /**/          toint = {{0x00000000, 0x43380000} };
269
270 #endif
271 #endif
272
273
274 #define  ZERO      zero.d
275 #define  ONE       one.d
276 #define  MONE      mone.d
277 #define  TWO8      two8.d
278
279 #endif