Back to index

glibc  2.9
mpexp.h
Go to the documentation of this file.
00001 /*
00002  * IBM Accurate Mathematical Library
00003  * Written by International Business Machines Corp.
00004  * Copyright (C) 2001 Free Software Foundation, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2.1 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019  */
00020 
00021 /******************************************************************/
00022 /*                                                                */
00023 /* MODULE_NAME:mpexp.h                                            */
00024 /*                                                                */
00025 /* common data and variables prototype and definition             */
00026 /******************************************************************/
00027 
00028 #ifndef MPEXP_H
00029 #define MPEXP_H
00030 
00031 #ifdef BIG_ENDI
00032   static const number
00033         twomm1[33] = {                            /* 2**-m1 */
00034                   {{0x00000000, 0x00000000} }, /* 0      */
00035                   {{0x00000000, 0x00000000} }, /* 0      */
00036                   {{0x00000000, 0x00000000} }, /* 0      */
00037                   {{0x00000000, 0x00000000} }, /* 0      */
00038                   {{0x3ee00000, 0x00000000} }, /* 2**-17 */
00039                   {{0x3e800000, 0x00000000} }, /* 2**-23 */
00040                   {{0x3e800000, 0x00000000} }, /* 2**-23 */
00041                   {{0x3e300000, 0x00000000} }, /* 2**-28 */
00042                   {{0x3e400000, 0x00000000} }, /* 2**-27 */
00043                   {{0x3d900000, 0x00000000} }, /* 2**-38 */
00044                   {{0x3d500000, 0x00000000} }, /* 2**-42 */
00045                   {{0x3d800000, 0x00000000} }, /* 2**-39 */
00046                   {{0x3d400000, 0x00000000} }, /* 2**-43 */
00047                   {{0x3d000000, 0x00000000} }, /* 2**-47 */
00048                   {{0x3d400000, 0x00000000} }, /* 2**-43 */
00049                   {{0x3d000000, 0x00000000} }, /* 2**-47 */
00050                   {{0x3cd00000, 0x00000000} }, /* 2**-50 */
00051                   {{0x3c900000, 0x00000000} }, /* 2**-54 */
00052                   {{0x3c600000, 0x00000000} }, /* 2**-57 */
00053                   {{0x3c300000, 0x00000000} }, /* 2**-60 */
00054                   {{0x3bf00000, 0x00000000} }, /* 2**-64 */
00055                   {{0x3bc00000, 0x00000000} }, /* 2**-67 */
00056                   {{0x3b800000, 0x00000000} }, /* 2**-71 */
00057                   {{0x3b500000, 0x00000000} }, /* 2**-74 */
00058                   {{0x3bb00000, 0x00000000} }, /* 2**-68 */
00059                   {{0x3b800000, 0x00000000} }, /* 2**-71 */
00060                   {{0x3b500000, 0x00000000} }, /* 2**-74 */
00061                   {{0x3b200000, 0x00000000} }, /* 2**-77 */
00062                   {{0x3b900000, 0x00000000} }, /* 2**-70 */
00063                   {{0x3b600000, 0x00000000} }, /* 2**-73 */
00064                   {{0x3b300000, 0x00000000} }, /* 2**-76 */
00065                   {{0x3b100000, 0x00000000} }, /* 2**-78 */
00066                   {{0x3ae00000, 0x00000000} }, /* 2**-81 */
00067   };
00068   static const number
00069                nn[9]={                            /* n      */
00070                   {{0x00000000, 0x00000000} }, /* 0      */
00071                   {{0x3ff00000, 0x00000000} }, /* 1      */
00072                   {{0x40000000, 0x00000000} }, /* 2      */
00073                   {{0x40080000, 0x00000000} }, /* 3      */
00074                   {{0x40100000, 0x00000000} }, /* 4      */
00075                   {{0x40140000, 0x00000000} }, /* 5      */
00076                   {{0x40180000, 0x00000000} }, /* 6      */
00077                   {{0x401c0000, 0x00000000} }, /* 7      */
00078                   {{0x40200000, 0x00000000} }, /* 8      */
00079   };
00080 
00081   static const number
00082  radix          = {{0x41700000, 0x00000000} }, /* 2**24  */
00083  radixi         = {{0x3e700000, 0x00000000} }, /* 2**-24 */
00084  zero           = {{0x00000000, 0x00000000} }, /* 0      */
00085  one            = {{0x3ff00000, 0x00000000} }, /* 1      */
00086  two            = {{0x40000000, 0x00000000} }, /* 2      */
00087  half           = {{0x3fe00000, 0x00000000} }; /* 1/2    */
00088 
00089 #else
00090 #ifdef LITTLE_ENDI
00091   static const number
00092         twomm1[33] = {                            /* 2**-m1 */
00093                   {{0x00000000, 0x00000000} }, /* 0      */
00094                   {{0x00000000, 0x00000000} }, /* 0      */
00095                   {{0x00000000, 0x00000000} }, /* 0      */
00096                   {{0x00000000, 0x00000000} }, /* 0      */
00097                   {{0x00000000, 0x3ee00000} }, /* 2**-17 */
00098                   {{0x00000000, 0x3e800000} }, /* 2**-23 */
00099                   {{0x00000000, 0x3e800000} }, /* 2**-23 */
00100                   {{0x00000000, 0x3e300000} }, /* 2**-28 */
00101                   {{0x00000000, 0x3e400000} }, /* 2**-27 */
00102                   {{0x00000000, 0x3d900000} }, /* 2**-38 */
00103                   {{0x00000000, 0x3d500000} }, /* 2**-42 */
00104                   {{0x00000000, 0x3d800000} }, /* 2**-39 */
00105                   {{0x00000000, 0x3d400000} }, /* 2**-43 */
00106                   {{0x00000000, 0x3d000000} }, /* 2**-47 */
00107                   {{0x00000000, 0x3d400000} }, /* 2**-43 */
00108                   {{0x00000000, 0x3d000000} }, /* 2**-47 */
00109                   {{0x00000000, 0x3cd00000} }, /* 2**-50 */
00110                   {{0x00000000, 0x3c900000} }, /* 2**-54 */
00111                   {{0x00000000, 0x3c600000} }, /* 2**-57 */
00112                   {{0x00000000, 0x3c300000} }, /* 2**-60 */
00113                   {{0x00000000, 0x3bf00000} }, /* 2**-64 */
00114                   {{0x00000000, 0x3bc00000} }, /* 2**-67 */
00115                   {{0x00000000, 0x3b800000} }, /* 2**-71 */
00116                   {{0x00000000, 0x3b500000} }, /* 2**-74 */
00117                   {{0x00000000, 0x3bb00000} }, /* 2**-68 */
00118                   {{0x00000000, 0x3b800000} }, /* 2**-71 */
00119                   {{0x00000000, 0x3b500000} }, /* 2**-74 */
00120                   {{0x00000000, 0x3b200000} }, /* 2**-77 */
00121                   {{0x00000000, 0x3b900000} }, /* 2**-70 */
00122                   {{0x00000000, 0x3b600000} }, /* 2**-73 */
00123                   {{0x00000000, 0x3b300000} }, /* 2**-76 */
00124                   {{0x00000000, 0x3b100000} }, /* 2**-78 */
00125                   {{0x00000000, 0x3ae00000} }, /* 2**-81 */
00126   };
00127   static const number
00128                nn[9]={                            /* n      */
00129                   {{0x00000000, 0x00000000} }, /* 0      */
00130                   {{0x00000000, 0x3ff00000} }, /* 1      */
00131                   {{0x00000000, 0x40000000} }, /* 2      */
00132                   {{0x00000000, 0x40080000} }, /* 3      */
00133                   {{0x00000000, 0x40100000} }, /* 4      */
00134                   {{0x00000000, 0x40140000} }, /* 5      */
00135                   {{0x00000000, 0x40180000} }, /* 6      */
00136                   {{0x00000000, 0x401c0000} }, /* 7      */
00137                   {{0x00000000, 0x40200000} }, /* 8      */
00138   };
00139 
00140   static const number
00141  radix          = {{0x00000000, 0x41700000} }, /* 2**24  */
00142  radixi         = {{0x00000000, 0x3e700000} }, /* 2**-24 */
00143  zero           = {{0x00000000, 0x00000000} }, /* 0      */
00144  one            = {{0x00000000, 0x3ff00000} }, /* 1      */
00145  two            = {{0x00000000, 0x40000000} }, /* 2      */
00146  half           = {{0x00000000, 0x3fe00000} }; /* 1/2    */
00147 
00148 #endif
00149 #endif
00150 
00151 #define  RADIX     radix.d
00152 #define  RADIXI    radixi.d
00153 #define  ZERO      zero.d
00154 #define  ONE       one.d
00155 #define  TWO       two.d
00156 #define  HALF      half.d
00157 
00158 #endif