1 2 /* 3 * IBM Accurate Mathematical Library 4 * Written by International Business Machines Corp. 5 * Copyright (C) 2001 Free Software Foundation, Inc. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU Lesser General Public License as published by 9 * the Free Software Foundation; either version 2.1 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 */ 21 22 /**************************************************************************/ 23 /* */ 24 /* MODULE_NAME:mpa2.h */ 25 /* */ 26 /* */ 27 /* variables prototype and definition according to type of processor */ 28 /* types definition */ 29 /**************************************************************************/ 30 31 #ifndef MPA2_H 32 #define MPA2_H 33 34 35 #ifdef BIG_ENDI 36 static const number 37 /**/ radix = {{0x41700000, 0x00000000} }, /* 2**24 */ 38 /**/ radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */ 39 /**/ cutter = {{0x44b00000, 0x00000000} }, /* 2**76 */ 40 /**/ zero = {{0x00000000, 0x00000000} }, /* 0 */ 41 /**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */ 42 /**/ mone = {{0xbff00000, 0x00000000} }, /* -1 */ 43 /**/ two = {{0x40000000, 0x00000000} }, /* 2 */ 44 /**/ two5 = {{0x40400000, 0x00000000} }, /* 2**5 */ 45 /**/ two10 = {{0x40900000, 0x00000000} }, /* 2**10 */ 46 /**/ two18 = {{0x41100000, 0x00000000} }, /* 2**18 */ 47 /**/ two19 = {{0x41200000, 0x00000000} }, /* 2**19 */ 48 /**/ two23 = {{0x41600000, 0x00000000} }, /* 2**23 */ 49 /**/ two52 = {{0x43300000, 0x00000000} }, /* 2**52 */ 50 /**/ two57 = {{0x43800000, 0x00000000} }, /* 2**57 */ 51 /**/ two71 = {{0x44600000, 0x00000000} }, /* 2**71 */ 52 /**/ twom1032 = {{0x00000400, 0x00000000} }; /* 2**-1032 */ 53 54 #else 55 #ifdef LITTLE_ENDI 56 static const number 57 /**/ radix = {{0x00000000, 0x41700000} }, /* 2**24 */ 58 /**/ radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */ 59 /**/ cutter = {{0x00000000, 0x44b00000} }, /* 2**76 */ 60 /**/ zero = {{0x00000000, 0x00000000} }, /* 0 */ 61 /**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */ 62 /**/ mone = {{0x00000000, 0xbff00000} }, /* -1 */ 63 /**/ two = {{0x00000000, 0x40000000} }, /* 2 */ 64 /**/ two5 = {{0x00000000, 0x40400000} }, /* 2**5 */ 65 /**/ two10 = {{0x00000000, 0x40900000} }, /* 2**10 */ 66 /**/ two18 = {{0x00000000, 0x41100000} }, /* 2**18 */ 67 /**/ two19 = {{0x00000000, 0x41200000} }, /* 2**19 */ 68 /**/ two23 = {{0x00000000, 0x41600000} }, /* 2**23 */ 69 /**/ two52 = {{0x00000000, 0x43300000} }, /* 2**52 */ 70 /**/ two57 = {{0x00000000, 0x43800000} }, /* 2**57 */ 71 /**/ two71 = {{0x00000000, 0x44600000} }, /* 2**71 */ 72 /**/ twom1032 = {{0x00000000, 0x00000400} }; /* 2**-1032 */ 73 74 #endif 75 #endif 76 77 #define RADIX radix.d 78 #define RADIXI radixi.d 79 #define CUTTER cutter.d 80 #define ZERO zero.d 81 #define ONE one.d 82 #define MONE mone.d 83 #define TWO two.d 84 #define TWO5 two5.d 85 #define TWO10 two10.d 86 #define TWO18 two18.d 87 #define TWO19 two19.d 88 #define TWO23 two23.d 89 #define TWO52 two52.d 90 #define TWO57 two57.d 91 #define TWO71 two71.d 92 #define TWOM1032 twom1032.d 93 94 95 #endif 96