4f07f55197c6de54a5f47cc72d4a4f838f773134
[kopensolaris-gnu/glibc.git] / sysdeps / ieee754 / dbl-64 / mpexp.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:mpexp.h                                            */
23 /*                                                                */
24 /* common data and variables prototype and definition             */
25 /******************************************************************/
26
27 #ifndef MPEXP_H
28 #define MPEXP_H
29
30 #ifdef BIG_ENDI
31   static const number
32         twomm1[33] = {                            /* 2**-m1 */
33 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
34 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
35 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
36 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
37 /**/                  {{0x3ee00000, 0x00000000} }, /* 2**-17 */
38 /**/                  {{0x3e800000, 0x00000000} }, /* 2**-23 */
39 /**/                  {{0x3e800000, 0x00000000} }, /* 2**-23 */
40 /**/                  {{0x3e300000, 0x00000000} }, /* 2**-28 */
41 /**/                  {{0x3e400000, 0x00000000} }, /* 2**-27 */
42 /**/                  {{0x3d900000, 0x00000000} }, /* 2**-38 */
43 /**/                  {{0x3d500000, 0x00000000} }, /* 2**-42 */
44 /**/                  {{0x3d800000, 0x00000000} }, /* 2**-39 */
45 /**/                  {{0x3d400000, 0x00000000} }, /* 2**-43 */
46 /**/                  {{0x3d000000, 0x00000000} }, /* 2**-47 */
47 /**/                  {{0x3d400000, 0x00000000} }, /* 2**-43 */
48 /**/                  {{0x3d000000, 0x00000000} }, /* 2**-47 */
49 /**/                  {{0x3cd00000, 0x00000000} }, /* 2**-50 */
50 /**/                  {{0x3c900000, 0x00000000} }, /* 2**-54 */
51 /**/                  {{0x3c600000, 0x00000000} }, /* 2**-57 */
52 /**/                  {{0x3c300000, 0x00000000} }, /* 2**-60 */
53 /**/                  {{0x3bf00000, 0x00000000} }, /* 2**-64 */
54 /**/                  {{0x3bc00000, 0x00000000} }, /* 2**-67 */
55 /**/                  {{0x3b800000, 0x00000000} }, /* 2**-71 */
56 /**/                  {{0x3b500000, 0x00000000} }, /* 2**-74 */
57 /**/                  {{0x3bb00000, 0x00000000} }, /* 2**-68 */
58 /**/                  {{0x3b800000, 0x00000000} }, /* 2**-71 */
59 /**/                  {{0x3b500000, 0x00000000} }, /* 2**-74 */
60 /**/                  {{0x3b200000, 0x00000000} }, /* 2**-77 */
61 /**/                  {{0x3b900000, 0x00000000} }, /* 2**-70 */
62 /**/                  {{0x3b600000, 0x00000000} }, /* 2**-73 */
63 /**/                  {{0x3b300000, 0x00000000} }, /* 2**-76 */
64 /**/                  {{0x3b100000, 0x00000000} }, /* 2**-78 */
65 /**/                  {{0x3ae00000, 0x00000000} }, /* 2**-81 */
66   };
67   static const number
68                nn[9]={                            /* n      */
69 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
70 /**/                  {{0x3ff00000, 0x00000000} }, /* 1      */
71 /**/                  {{0x40000000, 0x00000000} }, /* 2      */
72 /**/                  {{0x40080000, 0x00000000} }, /* 3      */
73 /**/                  {{0x40100000, 0x00000000} }, /* 4      */
74 /**/                  {{0x40140000, 0x00000000} }, /* 5      */
75 /**/                  {{0x40180000, 0x00000000} }, /* 6      */
76 /**/                  {{0x401c0000, 0x00000000} }, /* 7      */
77 /**/                  {{0x40200000, 0x00000000} }, /* 8      */
78   };
79
80   static const number
81 /**/ radix          = {{0x41700000, 0x00000000} }, /* 2**24  */
82 /**/ radixi         = {{0x3e700000, 0x00000000} }, /* 2**-24 */
83 /**/ zero           = {{0x00000000, 0x00000000} }, /* 0      */
84 /**/ one            = {{0x3ff00000, 0x00000000} }, /* 1      */
85 /**/ two            = {{0x40000000, 0x00000000} }, /* 2      */
86 /**/ half           = {{0x3fe00000, 0x00000000} }; /* 1/2    */
87
88 #else
89 #ifdef LITTLE_ENDI
90   static const number
91         twomm1[33] = {                            /* 2**-m1 */
92 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
93 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
94 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
95 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
96 /**/                  {{0x00000000, 0x3ee00000} }, /* 2**-17 */
97 /**/                  {{0x00000000, 0x3e800000} }, /* 2**-23 */
98 /**/                  {{0x00000000, 0x3e800000} }, /* 2**-23 */
99 /**/                  {{0x00000000, 0x3e300000} }, /* 2**-28 */
100 /**/                  {{0x00000000, 0x3e400000} }, /* 2**-27 */
101 /**/                  {{0x00000000, 0x3d900000} }, /* 2**-38 */
102 /**/                  {{0x00000000, 0x3d500000} }, /* 2**-42 */
103 /**/                  {{0x00000000, 0x3d800000} }, /* 2**-39 */
104 /**/                  {{0x00000000, 0x3d400000} }, /* 2**-43 */
105 /**/                  {{0x00000000, 0x3d000000} }, /* 2**-47 */
106 /**/                  {{0x00000000, 0x3d400000} }, /* 2**-43 */
107 /**/                  {{0x00000000, 0x3d000000} }, /* 2**-47 */
108 /**/                  {{0x00000000, 0x3cd00000} }, /* 2**-50 */
109 /**/                  {{0x00000000, 0x3c900000} }, /* 2**-54 */
110 /**/                  {{0x00000000, 0x3c600000} }, /* 2**-57 */
111 /**/                  {{0x00000000, 0x3c300000} }, /* 2**-60 */
112 /**/                  {{0x00000000, 0x3bf00000} }, /* 2**-64 */
113 /**/                  {{0x00000000, 0x3bc00000} }, /* 2**-67 */
114 /**/                  {{0x00000000, 0x3b800000} }, /* 2**-71 */
115 /**/                  {{0x00000000, 0x3b500000} }, /* 2**-74 */
116 /**/                  {{0x00000000, 0x3bb00000} }, /* 2**-68 */
117 /**/                  {{0x00000000, 0x3b800000} }, /* 2**-71 */
118 /**/                  {{0x00000000, 0x3b500000} }, /* 2**-74 */
119 /**/                  {{0x00000000, 0x3b200000} }, /* 2**-77 */
120 /**/                  {{0x00000000, 0x3b900000} }, /* 2**-70 */
121 /**/                  {{0x00000000, 0x3b600000} }, /* 2**-73 */
122 /**/                  {{0x00000000, 0x3b300000} }, /* 2**-76 */
123 /**/                  {{0x00000000, 0x3b100000} }, /* 2**-78 */
124 /**/                  {{0x00000000, 0x3ae00000} }, /* 2**-81 */
125   };
126   static const number
127                nn[9]={                            /* n      */
128 /**/                  {{0x00000000, 0x00000000} }, /* 0      */
129 /**/                  {{0x00000000, 0x3ff00000} }, /* 1      */
130 /**/                  {{0x00000000, 0x40000000} }, /* 2      */
131 /**/                  {{0x00000000, 0x40080000} }, /* 3      */
132 /**/                  {{0x00000000, 0x40100000} }, /* 4      */
133 /**/                  {{0x00000000, 0x40140000} }, /* 5      */
134 /**/                  {{0x00000000, 0x40180000} }, /* 6      */
135 /**/                  {{0x00000000, 0x401c0000} }, /* 7      */
136 /**/                  {{0x00000000, 0x40200000} }, /* 8      */
137   };
138
139   static const number
140 /**/ radix          = {{0x00000000, 0x41700000} }, /* 2**24  */
141 /**/ radixi         = {{0x00000000, 0x3e700000} }, /* 2**-24 */
142 /**/ zero           = {{0x00000000, 0x00000000} }, /* 0      */
143 /**/ one            = {{0x00000000, 0x3ff00000} }, /* 1      */
144 /**/ two            = {{0x00000000, 0x40000000} }, /* 2      */
145 /**/ half           = {{0x00000000, 0x3fe00000} }; /* 1/2    */
146
147 #endif
148 #endif
149
150 #define  RADIX     radix.d
151 #define  RADIXI    radixi.d
152 #define  ZERO      zero.d
153 #define  ONE       one.d
154 #define  TWO       two.d
155 #define  HALF      half.d
156
157 #endif