Back to index

glibc  2.9
uexp.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:uexp.h                                             */
00024 /*                                                                */
00025 /* common data and variables prototype and definition             */
00026 /******************************************************************/
00027 
00028 #ifndef UEXP_H
00029 #define UEXP_H
00030 
00031 #include "mydefs.h"
00032 
00033 const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
00034 err_0 = 1.000014, err_1 = 0.000016;
00035 const static int4 bigint = 0x40862002,
00036              badint = 0x40876000,smallint = 0x3C8fffff;
00037 const static int4 hugeint = 0x7FFFFFFF, infint = 0x7ff00000;
00038 
00039 #ifdef BIG_ENDI
00040 const static mynumber  inf  = {{0x7FF00000, 0}}; /* inf   */
00041 const static mynumber t256  = {{0x4ff00000, 0}}; /* 2^256 */
00042 
00043 const static mynumber ln_two1  = {{0x3FE62E42, 0xFEFA3800}};/*0.69314718055989033 */
00044 const static mynumber ln_two2  = {{0x3D2EF357, 0x93C76730}};/*5.4979230187083712e-14*/
00045 const static mynumber log2e    = {{0x3FF71547, 0x652B82FE}};/* 1.4426950408889634 */
00046 
00047 const static mynumber p2       = {{0x3FE00000, 0x000004DC}};/* 0.50000000000013811 */
00048 const static mynumber p3       = {{0x3FC55555, 0x55555A0F}};/* 0.16666666666670024 */
00049 
00050 const static mynumber three33  = {{0x42180000, 0}};         /* 25769803776 */
00051 const static mynumber three51  = {{0x43380000, 0}};         /*  6755399441055744 */
00052 
00053 #else
00054 #ifdef LITTLE_ENDI
00055  const static mynumber  inf  = {{0, 0x7FF00000}}; /* inf   */
00056  const static mynumber t256  = {{0, 0x4ff00000}}; /* 2^256 */
00057 
00058  const static mynumber ln_two1 = {{0xFEFA3800, 0x3FE62E42}};/*0.69314718055989033 */
00059  const static mynumber ln_two2 = {{0x93C76730, 0x3D2EF357}};/*5.4979230187083712e-14*/
00060  const static mynumber log2e   = {{0x652B82FE, 0x3FF71547}};/* 1.4426950408889634 */
00061 
00062  const static mynumber p2      = {{0x000004DC, 0x3FE00000}};/* 0.50000000000013811 */
00063  const static mynumber p3      = {{0x55555A0F, 0x3FC55555}};/* 0.16666666666670024 */
00064 
00065  const static mynumber three33 = {{0, 0x42180000}};   /*  25769803776      */
00066  const static mynumber three51 = {{0, 0x43380000}};   /*  6755399441055744 */
00067 
00068 #endif
00069 #endif
00070 #endif