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