Back to index

glibc  2.9
mpatan.h
Go to the documentation of this file.
00001 
00002 /*
00003  * IBM Accurate Mathematical Library
00004  * Written by International Business Machines Corp.
00005  * Copyright (C) 2001 Free Software Foundation, Inc.
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020  */
00021 
00022 /******************************************************************/
00023 /*                                                                */
00024 /* MODULE_NAME:mpatan.h                                           */
00025 /*                                                                */
00026 /* common data and variables prototype and definition             */
00027 /******************************************************************/
00028 
00029 #ifndef MPATAN_H
00030 #define MPATAN_H
00031 
00032 #ifdef BIG_ENDI
00033   static const number
00034             xm[8] = {                             /* x[m]   */
00035                   {{0x00000000, 0x00000000} }, /* 0.0    */
00036                   {{0x3f8930be, 0x00000000} }, /* 0.0123 */
00037                   {{0x3f991687, 0x00000000} }, /* 0.0245 */
00038                   {{0x3fa923a2, 0x00000000} }, /* 0.0491 */
00039                   {{0x3fb930be, 0x00000000} }, /* 0.0984 */
00040                   {{0x3fc95810, 0x00000000} }, /* 0.198  */
00041                   {{0x3fda7ef9, 0x00000000} }, /* 0.414  */
00042                   {{0x3ff00000, 0x00000000} }, /* 1.0    */
00043                     };
00044   static const number
00045        twonm1[33] = {                             /* 2n-1   */
00046                   {{0x00000000, 0x00000000} }, /* 0      */
00047                   {{0x00000000, 0x00000000} }, /* 0      */
00048                   {{0x00000000, 0x00000000} }, /* 0      */
00049                   {{0x00000000, 0x00000000} }, /* 0      */
00050                   {{0x40260000, 0x00000000} }, /* 11     */
00051                   {{0x402e0000, 0x00000000} }, /* 15     */
00052                   {{0x40330000, 0x00000000} }, /* 19     */
00053                   {{0x40350000, 0x00000000} }, /* 21     */
00054                   {{0x40390000, 0x00000000} }, /* 25     */
00055                   {{0x403d0000, 0x00000000} }, /* 29     */
00056                   {{0x40408000, 0x00000000} }, /* 33     */
00057                   {{0x40428000, 0x00000000} }, /* 37     */
00058                   {{0x40448000, 0x00000000} }, /* 41     */
00059                   {{0x40468000, 0x00000000} }, /* 45     */
00060                   {{0x40488000, 0x00000000} }, /* 49     */
00061                   {{0x404a8000, 0x00000000} }, /* 53     */
00062                   {{0x404b8000, 0x00000000} }, /* 55     */
00063                   {{0x404d8000, 0x00000000} }, /* 59     */
00064                   {{0x404f8000, 0x00000000} }, /* 63     */
00065                   {{0x4050c000, 0x00000000} }, /* 67     */
00066                   {{0x4051c000, 0x00000000} }, /* 71     */
00067                   {{0x4052c000, 0x00000000} }, /* 75     */
00068                   {{0x4053c000, 0x00000000} }, /* 79     */
00069                   {{0x4054c000, 0x00000000} }, /* 83     */
00070                   {{0x40554000, 0x00000000} }, /* 85     */
00071                   {{0x40564000, 0x00000000} }, /* 89     */
00072                   {{0x40574000, 0x00000000} }, /* 93     */
00073                   {{0x40584000, 0x00000000} }, /* 97     */
00074                   {{0x40594000, 0x00000000} }, /* 101    */
00075                   {{0x405a4000, 0x00000000} }, /* 105    */
00076                   {{0x405b4000, 0x00000000} }, /* 109    */
00077                   {{0x405c4000, 0x00000000} }, /* 113    */
00078                   {{0x405d4000, 0x00000000} }, /* 117    */
00079                     };
00080 
00081   static const number
00082           twom[8] = {                             /* 2**m   */
00083                   {{0x3ff00000, 0x00000000} }, /*   1.0  */
00084                   {{0x40000000, 0x00000000} }, /*   2.0  */
00085                   {{0x40100000, 0x00000000} }, /*   4.0  */
00086                   {{0x40200000, 0x00000000} }, /*   8.0  */
00087                   {{0x40300000, 0x00000000} }, /*  16.0  */
00088                   {{0x40400000, 0x00000000} }, /*  32.0  */
00089                   {{0x40500000, 0x00000000} }, /*  64.0  */
00090                   {{0x40600000, 0x00000000} }, /* 128.0  */
00091                     };
00092 
00093   static const number
00094  one            = {{0x3ff00000, 0x00000000} }, /* 1      */
00095  two            = {{0x40000000, 0x00000000} }; /* 2      */
00096 
00097 #else
00098 #ifdef LITTLE_ENDI
00099 
00100   static const number
00101             xm[8] = {                             /* x[m]   */
00102                   {{0x00000000, 0x00000000} }, /* 0.0    */
00103                   {{0x00000000, 0x3f8930be} }, /* 0.0123 */
00104                   {{0x00000000, 0x3f991687} }, /* 0.0245 */
00105                   {{0x00000000, 0x3fa923a2} }, /* 0.0491 */
00106                   {{0x00000000, 0x3fb930be} }, /* 0.0984 */
00107                   {{0x00000000, 0x3fc95810} }, /* 0.198  */
00108                   {{0x00000000, 0x3fda7ef9} }, /* 0.414  */
00109                   {{0x00000000, 0x3ff00000} }, /* 1.0    */
00110                     };
00111   static const number
00112        twonm1[33] = {                             /* 2n-1   */
00113                   {{0x00000000, 0x00000000} }, /* 0      */
00114                   {{0x00000000, 0x00000000} }, /* 0      */
00115                   {{0x00000000, 0x00000000} }, /* 0      */
00116                   {{0x00000000, 0x00000000} }, /* 0      */
00117                   {{0x00000000, 0x40260000} }, /* 11     */
00118                   {{0x00000000, 0x402e0000} }, /* 15     */
00119                   {{0x00000000, 0x40330000} }, /* 19     */
00120                   {{0x00000000, 0x40350000} }, /* 21     */
00121                   {{0x00000000, 0x40390000} }, /* 25     */
00122                   {{0x00000000, 0x403d0000} }, /* 29     */
00123                   {{0x00000000, 0x40408000} }, /* 33     */
00124                   {{0x00000000, 0x40428000} }, /* 37     */
00125                   {{0x00000000, 0x40448000} }, /* 41     */
00126                   {{0x00000000, 0x40468000} }, /* 45     */
00127                   {{0x00000000, 0x40488000} }, /* 49     */
00128                   {{0x00000000, 0x404a8000} }, /* 53     */
00129                   {{0x00000000, 0x404b8000} }, /* 55     */
00130                   {{0x00000000, 0x404d8000} }, /* 59     */
00131                   {{0x00000000, 0x404f8000} }, /* 63     */
00132                   {{0x00000000, 0x4050c000} }, /* 67     */
00133                   {{0x00000000, 0x4051c000} }, /* 71     */
00134                   {{0x00000000, 0x4052c000} }, /* 75     */
00135                   {{0x00000000, 0x4053c000} }, /* 79     */
00136                   {{0x00000000, 0x4054c000} }, /* 83     */
00137                   {{0x00000000, 0x40554000} }, /* 85     */
00138                   {{0x00000000, 0x40564000} }, /* 89     */
00139                   {{0x00000000, 0x40574000} }, /* 93     */
00140                   {{0x00000000, 0x40584000} }, /* 97     */
00141                   {{0x00000000, 0x40594000} }, /* 101    */
00142                   {{0x00000000, 0x405a4000} }, /* 105    */
00143                   {{0x00000000, 0x405b4000} }, /* 109    */
00144                   {{0x00000000, 0x405c4000} }, /* 113    */
00145                   {{0x00000000, 0x405d4000} }, /* 117    */
00146                     };
00147 
00148   static const number
00149           twom[8] = {                             /* 2**m   */
00150                   {{0x00000000, 0x3ff00000} }, /*   1.0  */
00151                   {{0x00000000, 0x40000000} }, /*   2.0  */
00152                   {{0x00000000, 0x40100000} }, /*   4.0  */
00153                   {{0x00000000, 0x40200000} }, /*   8.0  */
00154                   {{0x00000000, 0x40300000} }, /*  16.0  */
00155                   {{0x00000000, 0x40400000} }, /*  32.0  */
00156                   {{0x00000000, 0x40500000} }, /*  64.0  */
00157                   {{0x00000000, 0x40600000} }, /* 128.0  */
00158                     };
00159 
00160   static const number
00161  one            = {{0x00000000, 0x3ff00000} }, /* 1      */
00162  two            = {{0x00000000, 0x40000000} }; /* 2      */
00163 
00164 #endif
00165 #endif
00166 
00167 #define  ONE       one.d
00168 #define  TWO       two.d
00169 
00170   static const int
00171     np[33] = { 0, 0, 0, 0, 6, 8,10,11,13,15,17,19,21,23,25,27,28,
00172               30,32,34,36,38,40,42,43,45,47,49,51,53,55,57,59};
00173 
00174 #endif