Fix for logb/logbf/logbl (bugs 13954/13955/13956)
[glibc.git] / sysdeps / ieee754 / dbl-64 / mpexp.h
blob390e2720b00728a5803cbf934d63109bed42df01
1 /*
2 * IBM Accurate Mathematical Library
3 * Written by International Business Machines Corp.
4 * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
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.1 of the License, or
9 * (at your option) any later version.
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 Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 /******************************************************************/
21 /* */
22 /* MODULE_NAME:mpexp.h */
23 /* */
24 /* common data and variables prototype and definition */
25 /******************************************************************/
27 #ifndef MPEXP_H
28 #define MPEXP_H
30 extern const number __mpexp_twomm1[33] attribute_hidden;
31 extern const number __mpexp_nn[9] attribute_hidden;
32 extern const number __mpexp_radix attribute_hidden;
33 extern const number __mpexp_radixi attribute_hidden;
34 extern const number __mpexp_zero attribute_hidden;
35 extern const number __mpexp_one attribute_hidden;
36 extern const number __mpexp_two attribute_hidden;
37 extern const number __mpexp_half attribute_hidden;
40 #ifndef AVOID_MPEXP_H
41 #ifdef BIG_ENDI
42 const number
43 __mpexp_twomm1[33] = { /* 2**-m1 */
44 /**/ {{0x00000000, 0x00000000} }, /* 0 */
45 /**/ {{0x00000000, 0x00000000} }, /* 0 */
46 /**/ {{0x00000000, 0x00000000} }, /* 0 */
47 /**/ {{0x00000000, 0x00000000} }, /* 0 */
48 /**/ {{0x3ee00000, 0x00000000} }, /* 2**-17 */
49 /**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
50 /**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
51 /**/ {{0x3e300000, 0x00000000} }, /* 2**-28 */
52 /**/ {{0x3e400000, 0x00000000} }, /* 2**-27 */
53 /**/ {{0x3d900000, 0x00000000} }, /* 2**-38 */
54 /**/ {{0x3d500000, 0x00000000} }, /* 2**-42 */
55 /**/ {{0x3d800000, 0x00000000} }, /* 2**-39 */
56 /**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
57 /**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
58 /**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
59 /**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
60 /**/ {{0x3cd00000, 0x00000000} }, /* 2**-50 */
61 /**/ {{0x3c900000, 0x00000000} }, /* 2**-54 */
62 /**/ {{0x3c600000, 0x00000000} }, /* 2**-57 */
63 /**/ {{0x3c300000, 0x00000000} }, /* 2**-60 */
64 /**/ {{0x3bf00000, 0x00000000} }, /* 2**-64 */
65 /**/ {{0x3bc00000, 0x00000000} }, /* 2**-67 */
66 /**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
67 /**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
68 /**/ {{0x3bb00000, 0x00000000} }, /* 2**-68 */
69 /**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
70 /**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
71 /**/ {{0x3b200000, 0x00000000} }, /* 2**-77 */
72 /**/ {{0x3b900000, 0x00000000} }, /* 2**-70 */
73 /**/ {{0x3b600000, 0x00000000} }, /* 2**-73 */
74 /**/ {{0x3b300000, 0x00000000} }, /* 2**-76 */
75 /**/ {{0x3b100000, 0x00000000} }, /* 2**-78 */
76 /**/ {{0x3ae00000, 0x00000000} }, /* 2**-81 */
78 const number
79 __mpexp_nn[9]={ /* n */
80 /**/ {{0x00000000, 0x00000000} }, /* 0 */
81 /**/ {{0x3ff00000, 0x00000000} }, /* 1 */
82 /**/ {{0x40000000, 0x00000000} }, /* 2 */
83 /**/ {{0x40080000, 0x00000000} }, /* 3 */
84 /**/ {{0x40100000, 0x00000000} }, /* 4 */
85 /**/ {{0x40140000, 0x00000000} }, /* 5 */
86 /**/ {{0x40180000, 0x00000000} }, /* 6 */
87 /**/ {{0x401c0000, 0x00000000} }, /* 7 */
88 /**/ {{0x40200000, 0x00000000} }, /* 8 */
91 const number
92 /**/ __mpexp_radix = {{0x41700000, 0x00000000} }, /* 2**24 */
93 /**/ __mpexp_radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
94 /**/ __mpexp_zero = {{0x00000000, 0x00000000} }, /* 0 */
95 /**/ __mpexp_one = {{0x3ff00000, 0x00000000} }, /* 1 */
96 /**/ __mpexp_two = {{0x40000000, 0x00000000} }, /* 2 */
97 /**/ __mpexp_half = {{0x3fe00000, 0x00000000} }; /* 1/2 */
99 #else
100 #ifdef LITTLE_ENDI
101 const number
102 __mpexp_twomm1[33] = { /* 2**-m1 */
103 /**/ {{0x00000000, 0x00000000} }, /* 0 */
104 /**/ {{0x00000000, 0x00000000} }, /* 0 */
105 /**/ {{0x00000000, 0x00000000} }, /* 0 */
106 /**/ {{0x00000000, 0x00000000} }, /* 0 */
107 /**/ {{0x00000000, 0x3ee00000} }, /* 2**-17 */
108 /**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
109 /**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
110 /**/ {{0x00000000, 0x3e300000} }, /* 2**-28 */
111 /**/ {{0x00000000, 0x3e400000} }, /* 2**-27 */
112 /**/ {{0x00000000, 0x3d900000} }, /* 2**-38 */
113 /**/ {{0x00000000, 0x3d500000} }, /* 2**-42 */
114 /**/ {{0x00000000, 0x3d800000} }, /* 2**-39 */
115 /**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
116 /**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
117 /**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
118 /**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
119 /**/ {{0x00000000, 0x3cd00000} }, /* 2**-50 */
120 /**/ {{0x00000000, 0x3c900000} }, /* 2**-54 */
121 /**/ {{0x00000000, 0x3c600000} }, /* 2**-57 */
122 /**/ {{0x00000000, 0x3c300000} }, /* 2**-60 */
123 /**/ {{0x00000000, 0x3bf00000} }, /* 2**-64 */
124 /**/ {{0x00000000, 0x3bc00000} }, /* 2**-67 */
125 /**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
126 /**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
127 /**/ {{0x00000000, 0x3bb00000} }, /* 2**-68 */
128 /**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
129 /**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
130 /**/ {{0x00000000, 0x3b200000} }, /* 2**-77 */
131 /**/ {{0x00000000, 0x3b900000} }, /* 2**-70 */
132 /**/ {{0x00000000, 0x3b600000} }, /* 2**-73 */
133 /**/ {{0x00000000, 0x3b300000} }, /* 2**-76 */
134 /**/ {{0x00000000, 0x3b100000} }, /* 2**-78 */
135 /**/ {{0x00000000, 0x3ae00000} }, /* 2**-81 */
137 const number
138 __mpexp_nn[9]={ /* n */
139 /**/ {{0x00000000, 0x00000000} }, /* 0 */
140 /**/ {{0x00000000, 0x3ff00000} }, /* 1 */
141 /**/ {{0x00000000, 0x40000000} }, /* 2 */
142 /**/ {{0x00000000, 0x40080000} }, /* 3 */
143 /**/ {{0x00000000, 0x40100000} }, /* 4 */
144 /**/ {{0x00000000, 0x40140000} }, /* 5 */
145 /**/ {{0x00000000, 0x40180000} }, /* 6 */
146 /**/ {{0x00000000, 0x401c0000} }, /* 7 */
147 /**/ {{0x00000000, 0x40200000} }, /* 8 */
150 const number
151 /**/ __mpexp_radix = {{0x00000000, 0x41700000} }, /* 2**24 */
152 /**/ __mpexp_radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
153 /**/ __mpexp_zero = {{0x00000000, 0x00000000} }, /* 0 */
154 /**/ __mpexp_one = {{0x00000000, 0x3ff00000} }, /* 1 */
155 /**/ __mpexp_two = {{0x00000000, 0x40000000} }, /* 2 */
156 /**/ __mpexp_half = {{0x00000000, 0x3fe00000} }; /* 1/2 */
158 #endif
159 #endif
160 #endif
162 #define RADIX __mpexp_radix.d
163 #define RADIXI __mpexp_radixi.d
164 #define ZERO __mpexp_zero.d
165 #define ONE __mpexp_one.d
166 #define TWO __mpexp_two.d
167 #define HALF __mpexp_half.d
169 #endif