Makefile.am: Do not build dbl-64 variants.

2006-03-30  Richard Guenther  <rguenther@suse.de>

	* i386/Makefile.am: Do not build dbl-64 variants.
	* i386/Makefile.in: Regenerate.
	* dbl-64: Remove.

	* config/i386/i386.c: Remove builtins for SSE2 ABI intrinsic
	variants with double arguments.

	* gcc.target/i386/sselibm-1.c: Adjust for libgcc-math partial
	removal.
	* gcc.target/i386/sselibm-2.c: Likewise.
	* gcc.target/i386/sselibm-3.c: Likewise.
	* gcc.target/i386/sselibm-4.c: Likewise.
	* gcc.target/i386/sselibm-5.c: Likewise.

From-SVN: r112530
This commit is contained in:
Richard Guenther 2006-03-30 12:11:16 +00:00 committed by Richard Biener
parent 5cd88d6857
commit 7d3a3b01c3
74 changed files with 41 additions and 44639 deletions

View file

@ -1,3 +1,8 @@
2006-03-30 Richard Guenther <rguenther@suse.de>
* config/i386/i386.c: Remove builtins for SSE2 ABI intrinsic
variants with double arguments.
2006-03-29 David Edelsohn <edelsohn@gnu.org>
* genpreds.c (write_tm_constrs_h): Delete variable p.

View file

@ -15349,7 +15349,7 @@ ix86_init_mmx_sse_builtins (void)
static void
ix86_init_sse_abi_builtins (void)
{
tree dbl, flt, dbl2, flt2;
tree flt, flt2;
/* Bail out in case the template definitions are not available. */
if (! built_in_decls [BUILT_IN_SIN]
@ -15359,18 +15359,10 @@ ix86_init_sse_abi_builtins (void)
return;
/* Build the function types as variants of the existing ones. */
dbl = build_variant_type_copy (TREE_TYPE (built_in_decls [BUILT_IN_SIN]));
TYPE_ATTRIBUTES (dbl)
= tree_cons (get_identifier ("sseregparm"),
NULL_TREE, TYPE_ATTRIBUTES (dbl));
flt = build_variant_type_copy (TREE_TYPE (built_in_decls [BUILT_IN_SINF]));
TYPE_ATTRIBUTES (flt)
= tree_cons (get_identifier ("sseregparm"),
NULL_TREE, TYPE_ATTRIBUTES (flt));
dbl2 = build_variant_type_copy (TREE_TYPE (built_in_decls [BUILT_IN_ATAN2]));
TYPE_ATTRIBUTES (dbl2)
= tree_cons (get_identifier ("sseregparm"),
NULL_TREE, TYPE_ATTRIBUTES (dbl2));
flt2 = build_variant_type_copy (TREE_TYPE (built_in_decls [BUILT_IN_ATAN2F]));
TYPE_ATTRIBUTES (flt2)
= tree_cons (get_identifier ("sseregparm"),
@ -15383,25 +15375,15 @@ ix86_init_sse_abi_builtins (void)
BUILT_IN_NORMAL, \
"__libm_sse2_" # name, NULL_TREE)
def_builtin (ACOS, acos, dbl);
def_builtin (ACOSF, acosf, flt);
def_builtin (ASIN, asin, dbl);
def_builtin (ASINF, asinf, flt);
def_builtin (ATAN, atan, dbl);
def_builtin (ATANF, atanf, flt);
def_builtin (ATAN2, atan2, dbl2);
def_builtin (ATAN2F, atan2f, flt2);
def_builtin (COS, cos, dbl);
def_builtin (COSF, cosf, flt);
def_builtin (EXP, exp, dbl);
def_builtin (EXPF, expf, flt);
def_builtin (LOG10, log10, dbl);
def_builtin (LOG10F, log10f, flt);
def_builtin (LOG, log, dbl);
def_builtin (LOGF, logf, flt);
def_builtin (SIN, sin, dbl);
def_builtin (SINF, sinf, flt);
def_builtin (TAN, tan, dbl);
def_builtin (TANF, tanf, flt);
#undef def_builtin

View file

@ -1,3 +1,12 @@
2006-03-30 Richard Guenther <rguenther@suse.de>
* gcc.target/i386/sselibm-1.c: Adjust for libgcc-math partial
removal.
* gcc.target/i386/sselibm-2.c: Likewise.
* gcc.target/i386/sselibm-3.c: Likewise.
* gcc.target/i386/sselibm-4.c: Likewise.
* gcc.target/i386/sselibm-5.c: Likewise.
2006-03-28 Roger Sayle <roger@eyesopen.com>
* gcc.dg/fold-andxor-1.c: New test case.

View file

@ -2,11 +2,11 @@
/* { dg-options "-msse2 -mfpmath=sse" } */
/* { dg-require-effective-target ilp32 } */
double sin(double);
float sinf(float);
double foo(double x)
float foo(float x)
{
return sin(x);
return sinf(x);
}
/* { dg-final { scan-assembler-not "__libm_sse2_sin" } } */
/* { dg-final { scan-assembler-not "__libm_sse2_sinf" } } */

View file

@ -2,11 +2,11 @@
/* { dg-options "-msse2 -mfpmath=sse -msselibm" } */
/* { dg-require-effective-target ilp32 } */
double sin(double);
float sinf(float);
double foo(double x)
float foo(float x)
{
return sin(x);
return sinf(x);
}
/* { dg-final { scan-assembler "__libm_sse2_sin" } } */
/* { dg-final { scan-assembler "__libm_sse2_sinf" } } */

View file

@ -2,18 +2,18 @@
/* { dg-options "-O1 -msse2 -mfpmath=sse -msselibm" } */
/* { dg-require-effective-target ilp32 } */
double sin(double);
double (*mysin)(double) = sin;
float sinf(float);
float (*mysin)(float) = sinf;
double f1(double x)
float f1(float x)
{
return sin(x);
return sinf(x);
}
double f2(double x)
float f2(float x)
{
/* Verify we do not expand the following call to __libm_sse2_sin. */
/* Verify we do not expand the following call to __libm_sse2_sinf. */
return (*mysin)(x);
}
/* { dg-final { scan-assembler-times "__libm_sse2_sin" 1 } } */
/* { dg-final { scan-assembler-times "__libm_sse2_sinf" 1 } } */

View file

@ -2,17 +2,6 @@
/* { dg-options "-O1 -msse2 -mfpmath=sse -msselibm" } */
/* { dg-require-effective-target ilp32 } */
extern double acos(double);
extern double asin(double);
extern double atan(double);
extern double atan2(double, double);
extern double cos(double);
extern double exp(double);
extern double log10(double);
extern double log(double);
extern double sin(double);
extern double tan(double);
extern float acosf(float);
extern float asinf(float);
extern float atanf(float);
@ -30,10 +19,4 @@ float foof(float x)
+ log10f(x) + logf(x) + sinf(x) + tanf(x);
}
double foo(double x)
{
return acos(x) + asin(x) + atan(x) + atan2(x, x) + cos(x) + exp(x)
+ log10(x) + log(x) + sin(x) + tan(x);
}
/* { dg-final { scan-assembler-times "__libm_sse2" 20 } } */
/* { dg-final { scan-assembler-times "__libm_sse2" 10 } } */

View file

@ -2,17 +2,6 @@
/* { dg-options "-O1 -msse2 -mfpmath=sse -msselibm" } */
/* { dg-require-effective-target ilp32 } */
extern double acos(double);
extern double asin(double);
extern double atan(double);
extern double atan2(double, double);
extern double cos(double);
extern double exp(double);
extern double log10(double);
extern double log(double);
extern double sin(double);
extern double tan(double);
extern float acosf(float);
extern float asinf(float);
extern float atanf(float);
@ -38,18 +27,4 @@ float foof(float x)
+ __builtin_sse2_tanf(x);
}
double foo(double x)
{
return __builtin_sse2_acos(x)
+ __builtin_sse2_asin(x)
+ __builtin_sse2_atan(x)
+ __builtin_sse2_atan2(x, x)
+ __builtin_sse2_cos(x)
+ __builtin_sse2_exp(x)
+ __builtin_sse2_log10(x)
+ __builtin_sse2_log(x)
+ __builtin_sse2_sin(x)
+ __builtin_sse2_tan(x);
}
/* { dg-final { scan-assembler-times "__libm_sse2" 20 } } */
/* { dg-final { scan-assembler-times "__libm_sse2" 10 } } */

View file

@ -1,3 +1,9 @@
2006-03-30 Richard Guenther <rguenther@suse.de>
* i386/Makefile.am: Do not build dbl-64 variants.
* i386/Makefile.in: Regenerate.
* dbl-64: Remove.
2006-03-20 Richard Guenther <rguenther@suse.de>
* README: New file.

View file

@ -1,103 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/********************************************************************/
/* Ultimate math functions. Each function computes the exact */
/* theoretical value of its argument rounded to nearest or even. */
/* */
/* Assumption: Machine arithmetic operations are performed in */
/* round nearest mode of IEEE 754 standard. */
/********************************************************************/
#ifndef UMATH_LIB
#define UMATH_LIB
/********************************************************************/
/* Function changes the precision mode to IEEE 754 double precision */
/* and the rounding mode to nearest or even. */
/* It returns the original status of these modes. */
/* See further explanations of usage in DPChange.h */
/********************************************************************/
unsigned short Init_Lib(void);
/********************************************************************/
/* Function that changes the precision and rounding modes to the */
/* specified by the argument received. See further explanations in */
/* DPChange.h */
/********************************************************************/
void Exit_Lib(unsigned short);
/* The asin() function calculates the arc sine of its argument. */
/* The function returns the arc sine in radians */
/* (between -PI/2 and PI/2). */
/* If the argument is greater than 1 or less than -1 it returns */
/* a NaN. */
double uasin(double );
/* The acos() function calculates the arc cosine of its argument. */
/* The function returns the arc cosine in radians */
/* (between -PI/2 and PI/2). */
/* If the argument is greater than 1 or less than -1 it returns */
/* a NaN. */
double uacos(double );
/* The atan() function calculates the arctanget of its argument. */
/* The function returns the arc tangent in radians */
/* (between -PI/2 and PI/2). */
double uatan(double );
/* The uatan2() function calculates the arc tangent of the two arguments x */
/* and y (x is the right argument and y is the left one).The signs of both */
/* arguments are used to determine the quadrant of the result. */
/* The function returns the result in radians, which is between -PI and PI */
double uatan2(double ,double );
/* Compute log(x). The base of log is e (natural logarithm) */
double ulog(double );
/* Compute e raised to the power of argument x. */
double uexp(double );
/* Compute sin(x). The argument x is assumed to be given in radians.*/
double usin(double );
/* Compute cos(x). The argument x is assumed to be given in radians.*/
double ucos(double );
/* Compute tan(x). The argument x is assumed to be given in radians.*/
double utan(double );
/* Compute the square root of non-negative argument x. */
/* If x is negative the returned value is NaN. */
double usqrt(double );
/* Compute x raised to the power of y, where x is the left argument */
/* and y is the right argument. The function returns a NaN if x<0. */
/* If x equals zero it returns -inf */
double upow(double , double );
/* Computing x mod y, where x is the left argument and y is the */
/* right one. */
double uremainder(double , double );
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,167 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef ATNAT_H
#define ATNAT_H
#define M 4
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0xbfd55555, 0x55555555} }, /* -0.333... */
/**/ d5 = {{0x3fc99999, 0x999997fd} }, /* 0.199... */
/**/ d7 = {{0xbfc24924, 0x923f7603} }, /* -0.142... */
/**/ d9 = {{0x3fbc71c6, 0xe5129a3b} }, /* 0.111... */
/**/ d11 = {{0xbfb74580, 0x22b13c25} }, /* -0.090... */
/**/ d13 = {{0x3fb375f0, 0x8b31cbce} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {{0xbfd55555, 0x55555555} }, /* -1/3 */
/**/ ff3 = {{0xbc755555, 0x55555555} }, /* -1/3-f3 */
/**/ f5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ ff5 = {{0xbc699999, 0x9999999a} }, /* 1/5-f5 */
/**/ f7 = {{0xbfc24924, 0x92492492} }, /* -1/7 */
/**/ ff7 = {{0xbc624924, 0x92492492} }, /* -1/7-f7 */
/**/ f9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ ff9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-f9 */
/**/ f11 = {{0xbfb745d1, 0x745d1746} }, /* -1/11 */
/**/ f13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ f15 = {{0xbfb11111, 0x11111111} }, /* -1/15 */
/**/ f17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ f19 = {{0xbfaaf286, 0xbca1af28} }, /* -1/19 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ a = {{0x3e4bb67a, 0x00000000} }, /* 1.290e-8 */
/**/ b = {{0x3fb00000, 0x00000000} }, /* 1/16 */
/**/ c = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ d = {{0x40300000, 0x00000000} }, /* 16 */
/**/ e = {{0x43349ff2, 0x00000000} }, /* 5.805e15 */
/**/ hpi = {{0x3ff921fb, 0x54442d18} }, /* pi/2 */
/**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */
/**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */
/**/ u1 = {{0x3c2d3382, 0x00000000} }, /* 7.915e-19 */
/**/ u21 = {{0x3c6dffc0, 0x00000000} }, /* 1.301e-17 */
/**/ u22 = {{0x3c527bd0, 0x00000000} }, /* 4.008e-18 */
/**/ u23 = {{0x3c3cd057, 0x00000000} }, /* 1.562e-18 */
/**/ u24 = {{0x3c329cdf, 0x00000000} }, /* 1.009e-18 */
/**/ u31 = {{0x3c3a1edf, 0x00000000} }, /* 1.416e-18 */
/**/ u32 = {{0x3c33f0e1, 0x00000000} }, /* 1.081e-18 */
/**/ u4 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u5 = {{0x3aaef2d1, 0x00000000} }, /* 5e-26 */
/**/ u6 = {{0x3a98c56d, 0x00000000} }, /* 2.001e-26 */
/**/ u7 = {{0x3a9375de, 0x00000000} }, /* 1.572e-26 */
/**/ u8 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u9[M] ={{{0x38c1aa5b, 0x00000000} }, /* 2.658e-35 */
/**/ {{0x35c1aa4d, 0x00000000} }, /* 9.443e-50 */
/**/ {{0x32c1aa88, 0x00000000} }, /* 3.355e-64 */
/**/ {{0x11c1aa56, 0x00000000} }},/* 3.818e-223 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 2**8=256 */
/**/ two52 = {{0x43300000, 0x00000000} }; /* 2**52 */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0x55555555, 0xbfd55555} }, /* -0.333... */
/**/ d5 = {{0x999997fd, 0x3fc99999} }, /* 0.199... */
/**/ d7 = {{0x923f7603, 0xbfc24924} }, /* -0.142... */
/**/ d9 = {{0xe5129a3b, 0x3fbc71c6} }, /* 0.111... */
/**/ d11 = {{0x22b13c25, 0xbfb74580} }, /* -0.090... */
/**/ d13 = {{0x8b31cbce, 0x3fb375f0} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {{0x55555555, 0xbfd55555} }, /* -1/3 */
/**/ ff3 = {{0x55555555, 0xbc755555} }, /* -1/3-f3 */
/**/ f5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ ff5 = {{0x9999999a, 0xbc699999} }, /* 1/5-f5 */
/**/ f7 = {{0x92492492, 0xbfc24924} }, /* -1/7 */
/**/ ff7 = {{0x92492492, 0xbc624924} }, /* -1/7-f7 */
/**/ f9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ ff9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-f9 */
/**/ f11 = {{0x745d1746, 0xbfb745d1} }, /* -1/11 */
/**/ f13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ f15 = {{0x11111111, 0xbfb11111} }, /* -1/15 */
/**/ f17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ f19 = {{0xbca1af28, 0xbfaaf286} }, /* -1/19 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ a = {{0x00000000, 0x3e4bb67a} }, /* 1.290e-8 */
/**/ b = {{0x00000000, 0x3fb00000} }, /* 1/16 */
/**/ c = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ d = {{0x00000000, 0x40300000} }, /* 16 */
/**/ e = {{0x00000000, 0x43349ff2} }, /* 5.805e15 */
/**/ hpi = {{0x54442d18, 0x3ff921fb} }, /* pi/2 */
/**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */
/**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */
/**/ u1 = {{0x00000000, 0x3c2d3382} }, /* 7.915e-19 */
/**/ u21 = {{0x00000000, 0x3c6dffc0} }, /* 1.301e-17 */
/**/ u22 = {{0x00000000, 0x3c527bd0} }, /* 4.008e-18 */
/**/ u23 = {{0x00000000, 0x3c3cd057} }, /* 1.562e-18 */
/**/ u24 = {{0x00000000, 0x3c329cdf} }, /* 1.009e-18 */
/**/ u31 = {{0x00000000, 0x3c3a1edf} }, /* 1.416e-18 */
/**/ u32 = {{0x00000000, 0x3c33f0e1} }, /* 1.081e-18 */
/**/ u4 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u5 = {{0x00000000, 0x3aaef2d1} }, /* 5e-26 */
/**/ u6 = {{0x00000000, 0x3a98c56d} }, /* 2.001e-26 */
/**/ u7 = {{0x00000000, 0x3a9375de} }, /* 1.572e-26 */
/**/ u8 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u9[M] ={{{0x00000000, 0x38c1aa5b} }, /* 2.658e-35 */
/**/ {{0x00000000, 0x35c1aa4d} }, /* 9.443e-50 */
/**/ {{0x00000000, 0x32c1aa88} }, /* 3.355e-64 */
/**/ {{0x00000000, 0x11c1aa56} }},/* 3.818e-223 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 2**8=256 */
/**/ two52 = {{0x00000000, 0x43300000} }; /* 2**52 */
#endif
#endif
#define ZERO zero.d
#define ONE one.d
#define A a.d
#define B b.d
#define C c.d
#define D d.d
#define E e.d
#define HPI hpi.d
#define MHPI mhpi.d
#define HPI1 hpi1.d
#define U1 u1.d
#define U21 u21.d
#define U22 u22.d
#define U23 u23.d
#define U24 u24.d
#define U31 u31.d
#define U32 u32.d
#define U4 u4.d
#define U5 u5.d
#define U6 u6.d
#define U7 u7.d
#define U8 u8.d
#define TWO8 two8.d
#define TWO52 two52.d
#endif

View file

@ -1,185 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat2.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef ATNAT2_H
#define ATNAT2_H
#define MM 5
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0xbfd55555, 0x55555555} }, /* -0.333... */
/**/ d5 = {{0x3fc99999, 0x999997fd} }, /* 0.199... */
/**/ d7 = {{0xbfc24924, 0x923f7603} }, /* -0.142... */
/**/ d9 = {{0x3fbc71c6, 0xe5129a3b} }, /* 0.111... */
/**/ d11 = {{0xbfb74580, 0x22b13c25} }, /* -0.090... */
/**/ d13 = {{0x3fb375f0, 0x8b31cbce} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {{0xbfd55555, 0x55555555} }, /* -1/3 */
/**/ ff3 = {{0xbc755555, 0x55555555} }, /* -1/3-f3 */
/**/ f5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ ff5 = {{0xbc699999, 0x9999999a} }, /* 1/5-f5 */
/**/ f7 = {{0xbfc24924, 0x92492492} }, /* -1/7 */
/**/ ff7 = {{0xbc624924, 0x92492492} }, /* -1/7-f7 */
/**/ f9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ ff9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-f9 */
/**/ f11 = {{0xbfb745d1, 0x745d1746} }, /* -1/11 */
/**/ f13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ f15 = {{0xbfb11111, 0x11111111} }, /* -1/15 */
/**/ f17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ f19 = {{0xbfaaf286, 0xbca1af28} }, /* -1/19 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ mzero = {{0x80000000, 0x00000000} }, /* -0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ inv16 = {{0x3fb00000, 0x00000000} }, /* 1/16 */
/**/ opi = {{0x400921fb, 0x54442d18} }, /* pi */
/**/ opi1 = {{0x3ca1a626, 0x33145c07} }, /* pi-opi */
/**/ mopi = {{0xc00921fb, 0x54442d18} }, /* -pi */
/**/ hpi = {{0x3ff921fb, 0x54442d18} }, /* pi/2 */
/**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */
/**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */
/**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */
/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */
/**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */
/**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */
/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */
/**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */
/**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */
/**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u3 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u4 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
/**/ u5 = {{0x3aaef2d1, 0x00000000} }, /* 5e-26 */
/**/ u6 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u7 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u8 = {{0x3a6eeb36, 0x00000000} }, /* 3.122e-27 */
/**/ u91 = {{0x3c6dffc0, 0x00000000} }, /* 1.301e-17 */
/**/ u92 = {{0x3c527bd0, 0x00000000} }, /* 4.008e-18 */
/**/ u93 = {{0x3c3cd057, 0x00000000} }, /* 1.562e-18 */
/**/ u94 = {{0x3c329cdf, 0x00000000} }, /* 1.009e-18 */
/**/ ua1 = {{0x3c3a1edf, 0x00000000} }, /* 1.416e-18 */
/**/ ua2 = {{0x3c33f0e1, 0x00000000} }, /* 1.081e-18 */
/**/ ub = {{0x3a98c56d, 0x00000000} }, /* 2.001e-26 */
/**/ uc = {{0x3a9375de, 0x00000000} }, /* 1.572e-26 */
/**/ ud[MM] ={{{0x38c6eddf, 0x00000000} }, /* 3.450e-35 */
/**/ {{0x35c6ef60, 0x00000000} }, /* 1.226e-49 */
/**/ {{0x32c6ed2f, 0x00000000} }, /* 4.354e-64 */
/**/ {{0x23c6eee8, 0x00000000} }, /* 2.465e-136 */
/**/ {{0x11c6ed16, 0x00000000} }},/* 4.955e-223 */
/**/ ue = {{0x38900e9d, 0x00000000} }, /* 3.02e-36 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 2**8=256 */
/**/ two52 = {{0x43300000, 0x00000000} }, /* 2**52 */
/**/ two500 = {{0x5f300000, 0x00000000} }, /* 2**500 */
/**/ twom500 = {{0x20b00000, 0x00000000} }, /* 2**(-500) */
/**/ twom1022 = {{0x00100000, 0x00000000} }; /* 2**(-1022) */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0x55555555, 0xbfd55555} }, /* -0.333... */
/**/ d5 = {{0x999997fd, 0x3fc99999} }, /* 0.199... */
/**/ d7 = {{0x923f7603, 0xbfc24924} }, /* -0.142... */
/**/ d9 = {{0xe5129a3b, 0x3fbc71c6} }, /* 0.111... */
/**/ d11 = {{0x22b13c25, 0xbfb74580} }, /* -0.090... */
/**/ d13 = {{0x8b31cbce, 0x3fb375f0} }, /* 0.076... */
/* polynomial II */
/**/ f3 = {{0x55555555, 0xbfd55555} }, /* -1/3 */
/**/ ff3 = {{0x55555555, 0xbc755555} }, /* -1/3-f3 */
/**/ f5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ ff5 = {{0x9999999a, 0xbc699999} }, /* 1/5-f5 */
/**/ f7 = {{0x92492492, 0xbfc24924} }, /* -1/7 */
/**/ ff7 = {{0x92492492, 0xbc624924} }, /* -1/7-f7 */
/**/ f9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ ff9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-f9 */
/**/ f11 = {{0x745d1746, 0xbfb745d1} }, /* -1/11 */
/**/ f13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ f15 = {{0x11111111, 0xbfb11111} }, /* -1/15 */
/**/ f17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ f19 = {{0xbca1af28, 0xbfaaf286} }, /* -1/19 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ mzero = {{0x00000000, 0x80000000} }, /* -0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ inv16 = {{0x00000000, 0x3fb00000} }, /* 1/16 */
/**/ opi = {{0x54442d18, 0x400921fb} }, /* pi */
/**/ opi1 = {{0x33145c07, 0x3ca1a626} }, /* pi-opi */
/**/ mopi = {{0x54442d18, 0xc00921fb} }, /* -pi */
/**/ hpi = {{0x54442d18, 0x3ff921fb} }, /* pi/2 */
/**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */
/**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */
/**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */
/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */
/**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */
/**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */
/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */
/**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */
/**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */
/**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u3 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u4 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
/**/ u5 = {{0x00000000, 0x3aaef2d1} }, /* 5e-26 */
/**/ u6 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u7 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u8 = {{0x00000000, 0x3a6eeb36} }, /* 3.122e-27 */
/**/ u91 = {{0x00000000, 0x3c6dffc0} }, /* 1.301e-17 */
/**/ u92 = {{0x00000000, 0x3c527bd0} }, /* 4.008e-18 */
/**/ u93 = {{0x00000000, 0x3c3cd057} }, /* 1.562e-18 */
/**/ u94 = {{0x00000000, 0x3c329cdf} }, /* 1.009e-18 */
/**/ ua1 = {{0x00000000, 0x3c3a1edf} }, /* 1.416e-18 */
/**/ ua2 = {{0x00000000, 0x3c33f0e1} }, /* 1.081e-18 */
/**/ ub = {{0x00000000, 0x3a98c56d} }, /* 2.001e-26 */
/**/ uc = {{0x00000000, 0x3a9375de} }, /* 1.572e-26 */
/**/ ud[MM] ={{{0x00000000, 0x38c6eddf} }, /* 3.450e-35 */
/**/ {{0x00000000, 0x35c6ef60} }, /* 1.226e-49 */
/**/ {{0x00000000, 0x32c6ed2f} }, /* 4.354e-64 */
/**/ {{0x00000000, 0x23c6eee8} }, /* 2.465e-136 */
/**/ {{0x00000000, 0x11c6ed16} }},/* 4.955e-223 */
/**/ ue = {{0x00000000, 0x38900e9d} }, /* 3.02e-36 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 2**8=256 */
/**/ two52 = {{0x00000000, 0x43300000} }, /* 2**52 */
/**/ two500 = {{0x00000000, 0x5f300000} }, /* 2**500 */
/**/ twom500 = {{0x00000000, 0x20b00000} }, /* 2**(-500) */
/**/ twom1022 = {{0x00000000, 0x00100000} }; /* 2**(-1022) */
#endif
#endif
#define ZERO zero.d
#define MZERO mzero.d
#define ONE one.d
#define TWO8 two8.d
#define TWO52 two52.d
#define TWOM1022 twom1022.d
#endif

View file

@ -1,144 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*******************************************************************/
/* */
/* MODULE_NAME: branred.c */
/* */
/* FUNCTIONS: branred */
/* */
/* FILES NEEDED: branred.h mydefs.h endian.h mpa.h */
/* mha.c */
/* */
/* Routine branred() performs range reduction of a double number */
/* x into Double length number a+aa,such that */
/* x=n*pi/2+(a+aa), abs(a+aa)<pi/4, n=0,+-1,+-2,.... */
/* Routine returns the integer (n mod 4) of the above description */
/* of x. */
/*******************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "branred.h"
#include "math_private.h"
/*******************************************************************/
/* Routine branred() performs range reduction of a double number */
/* x into Double length number a+aa,such that */
/* x=n*pi/2+(a+aa), abs(a+aa)<pi/4, n=0,+-1,+-2,.... */
/* Routine return integer (n mod 4) */
/*******************************************************************/
int __branred(double x, double *a, double *aa)
{
int i,k;
#if 0
int n;
#endif
mynumber u,gor;
#if 0
mynumber v;
#endif
double r[6],s,t,sum,b,bb,sum1,sum2,b1,bb1,b2,bb2,x1,x2,t1,t2;
x*=tm600.x;
t=x*split; /* split x to two numbers */
x1=t-(t-x);
x2=x-x1;
sum=0;
u.x = x1;
k = (u.i[HIGH_HALF]>>20)&2047;
k = (k-450)/24;
if (k<0)
k=0;
gor.x = t576.x;
gor.i[HIGH_HALF] -= ((k*24)<<20);
for (i=0;i<6;i++)
{ r[i] = x1*toverp[k+i]*gor.x; gor.x *= tm24.x; }
for (i=0;i<3;i++) {
s=(r[i]+big.x)-big.x;
sum+=s;
r[i]-=s;
}
t=0;
for (i=0;i<6;i++)
t+=r[5-i];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
s=(t+big.x)-big.x;
sum+=s;
t-=s;
b=t+bb;
bb=(t-b)+bb;
s=(sum+big1.x)-big1.x;
sum-=s;
b1=b;
bb1=bb;
sum1=sum;
sum=0;
u.x = x2;
k = (u.i[HIGH_HALF]>>20)&2047;
k = (k-450)/24;
if (k<0)
k=0;
gor.x = t576.x;
gor.i[HIGH_HALF] -= ((k*24)<<20);
for (i=0;i<6;i++)
{ r[i] = x2*toverp[k+i]*gor.x; gor.x *= tm24.x; }
for (i=0;i<3;i++) {
s=(r[i]+big.x)-big.x;
sum+=s;
r[i]-=s;
}
t=0;
for (i=0;i<6;i++)
t+=r[5-i];
bb=(((((r[0]-t)+r[1])+r[2])+r[3])+r[4])+r[5];
s=(t+big.x)-big.x;
sum+=s;
t-=s;
b=t+bb;
bb=(t-b)+bb;
s=(sum+big1.x)-big1.x;
sum-=s;
b2=b;
bb2=bb;
sum2=sum;
sum=sum1+sum2;
b=b1+b2;
bb = (ABS(b1)>ABS(b2))? (b1-b)+b2 : (b2-b)+b1;
if (b > 0.5)
{b-=1.0; sum+=1.0;}
else if (b < -0.5)
{b+=1.0; sum-=1.0;}
s=b+(bb+bb1+bb2);
t=((b-s)+bb)+(bb1+bb2);
b=s*split;
t1=b-(b-s);
t2=s-t1;
b=s*hp0.x;
bb=(((t1*mp1.x-b)+t1*mp2.x)+t2*mp1.x)+(t2*mp2.x+s*hp1.x+t*hp0.x);
s=b+bb;
t=(b-s)+bb;
*a=s;
*aa=t;
return ((int) sum)&3; /* return quater of unit circle */
}

View file

@ -1,80 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: branred.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef BRANRED_H
#define BRANRED_H
#ifdef BIG_ENDI
static const mynumber
/**/ t576 = {{0x63f00000, 0x00000000}}, /* 2 ^ 576 */
/**/ tm600 = {{0x1a700000, 0x00000000}}, /* 2 ^- 600 */
/**/ tm24 = {{0x3e700000, 0x00000000}}, /* 2 ^- 24 */
/**/ big = {{0x43380000, 0x00000000}}, /* 6755399441055744 */
/**/ big1 = {{0x43580000, 0x00000000}}, /* 27021597764222976 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18}} ,/* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07}} ,/* 6.123233995736766e-17 */
/**/ mp1 = {{0x3FF921FB, 0x58000000}}, /* 1.5707963407039642 */
/**/ mp2 = {{0xBE4DDE97, 0x40000000}}; /*-1.3909067675399456e-08 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ t576 = {{0x00000000, 0x63f00000}}, /* 2 ^ 576 */
/**/ tm600 = {{0x00000000, 0x1a700000}}, /* 2 ^- 600 */
/**/ tm24 = {{0x00000000, 0x3e700000}}, /* 2 ^- 24 */
/**/ big = {{0x00000000, 0x43380000}}, /* 6755399441055744 */
/**/ big1 = {{0x00000000, 0x43580000}}, /* 27021597764222976 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB}}, /* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626}}, /* 6.123233995736766e-17 */
/**/ mp1 = {{0x58000000, 0x3FF921FB}}, /* 1.5707963407039642 */
/**/ mp2 = {{0x40000000, 0xBE4DDE97}}; /*-1.3909067675399456e-08 */
#endif
#endif
static const double toverp[75] = { /* 2/ PI base 24*/
10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0,
12639074.0, 9804092.0, 4427841.0, 16666979.0, 11263675.0,
12935607.0, 2387514.0, 4345298.0, 14681673.0, 3074569.0,
13734428.0, 16653803.0, 1880361.0, 10960616.0, 8533493.0,
3062596.0, 8710556.0, 7349940.0, 6258241.0, 3772886.0,
3769171.0, 3798172.0, 8675211.0, 12450088.0, 3874808.0,
9961438.0, 366607.0, 15675153.0, 9132554.0, 7151469.0,
3571407.0, 2607881.0, 12013382.0, 4155038.0, 6285869.0,
7677882.0, 13102053.0, 15825725.0, 473591.0, 9065106.0,
15363067.0, 6271263.0, 9264392.0, 5636912.0, 4652155.0,
7056368.0, 13614112.0, 10155062.0, 1944035.0, 9527646.0,
15080200.0, 6658437.0, 6231200.0, 6832269.0, 16767104.0,
5075751.0, 3212806.0, 1398474.0, 7579849.0, 6349435.0,
12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0,
12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 };
static const double split = 134217729.0;
#endif

View file

@ -1,174 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/***********************************************************************/
/*MODULE_NAME: dla.h */
/* */
/* This file holds C language macros for 'Double Length Floating Point */
/* Arithmetic'. The macros are based on the paper: */
/* T.J.Dekker, "A floating-point Technique for extending the */
/* Available Precision", Number. Math. 18, 224-242 (1971). */
/* A Double-Length number is defined by a pair (r,s), of IEEE double */
/* precision floating point numbers that satisfy, */
/* */
/* abs(s) <= abs(r+s)*2**(-53)/(1+2**(-53)). */
/* */
/* The computer arithmetic assumed is IEEE double precision in */
/* round to nearest mode. All variables in the macros must be of type */
/* IEEE double. */
/***********************************************************************/
/* CN = 1+2**27 = '41a0000002000000' IEEE double format */
#define CN 134217729.0
/* Exact addition of two single-length floating point numbers, Dekker. */
/* The macro produces a double-length number (z,zz) that satisfies */
/* z+zz = x+y exactly. */
#define EADD(x,y,z,zz) \
z=(x)+(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))+(y)) : (((y)-(z))+(x));
/* Exact subtraction of two single-length floating point numbers, Dekker. */
/* The macro produces a double-length number (z,zz) that satisfies */
/* z+zz = x-y exactly. */
#define ESUB(x,y,z,zz) \
z=(x)-(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))-(y)) : ((x)-((y)+(z)));
/* Exact multiplication of two single-length floating point numbers, */
/* Veltkamp. The macro produces a double-length number (z,zz) that */
/* satisfies z+zz = x*y exactly. p,hx,tx,hy,ty are temporary */
/* storage variables of type double. */
#define EMULV(x,y,z,zz,p,hx,tx,hy,ty) \
p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
z=(x)*(y); zz=(((hx*hy-z)+hx*ty)+tx*hy)+tx*ty;
/* Exact multiplication of two single-length floating point numbers, Dekker. */
/* The macro produces a nearly double-length number (z,zz) (see Dekker) */
/* that satisfies z+zz = x*y exactly. p,hx,tx,hy,ty,q are temporary */
/* storage variables of type double. */
#define MUL12(x,y,z,zz,p,hx,tx,hy,ty,q) \
p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
p=hx*hy; q=hx*ty+tx*hy; z=p+q; zz=((p-z)+q)+tx*ty;
/* Double-length addition, Dekker. The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = x+xx + y+yy. */
/* An error bound: (abs(x+xx)+abs(y+yy))*4.94e-32. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. r,s are temporary */
/* storage variables of type double. */
#define ADD2(x,xx,y,yy,z,zz,r,s) \
r=(x)+(y); s=(ABS(x)>ABS(y)) ? \
(((((x)-r)+(y))+(yy))+(xx)) : \
(((((y)-r)+(x))+(xx))+(yy)); \
z=r+s; zz=(r-z)+s;
/* Double-length subtraction, Dekker. The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = x+xx - (y+yy). */
/* An error bound: (abs(x+xx)+abs(y+yy))*4.94e-32. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. r,s are temporary */
/* storage variables of type double. */
#define SUB2(x,xx,y,yy,z,zz,r,s) \
r=(x)-(y); s=(ABS(x)>ABS(y)) ? \
(((((x)-r)-(y))-(yy))+(xx)) : \
((((x)-((y)+r))+(xx))-(yy)); \
z=r+s; zz=(r-z)+s;
/* Double-length multiplication, Dekker. The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = (x+xx)*(y+yy). */
/* An error bound: abs((x+xx)*(y+yy))*1.24e-31. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc are */
/* temporary storage variables of type double. */
#define MUL2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc) \
MUL12(x,y,c,cc,p,hx,tx,hy,ty,q) \
cc=((x)*(yy)+(xx)*(y))+cc; z=c+cc; zz=(c-z)+cc;
/* Double-length division, Dekker. The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = (x+xx)/(y+yy). */
/* An error bound: abs((x+xx)/(y+yy))*1.50e-31. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. p,hx,tx,hy,ty,q,c,cc,u,uu */
/* are temporary storage variables of type double. */
#define DIV2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc,u,uu) \
c=(x)/(y); MUL12(c,y,u,uu,p,hx,tx,hy,ty,q) \
cc=(((((x)-u)-uu)+(xx))-c*(yy))/(y); z=c+cc; zz=(c-z)+cc;
/* Double-length addition, slower but more accurate than ADD2. */
/* The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = (x+xx)+(y+yy). */
/* An error bound: abs(x+xx + y+yy)*1.50e-31. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. r,rr,s,ss,u,uu,w */
/* are temporary storage variables of type double. */
#define ADD2A(x,xx,y,yy,z,zz,r,rr,s,ss,u,uu,w) \
r=(x)+(y); \
if (ABS(x)>ABS(y)) { rr=((x)-r)+(y); s=(rr+(yy))+(xx); } \
else { rr=((y)-r)+(x); s=(rr+(xx))+(yy); } \
if (rr!=0.0) { \
z=r+s; zz=(r-z)+s; } \
else { \
ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)+(yy)) : (((yy)-s)+(xx)); \
u=r+s; \
uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
w=uu+ss; z=u+w; \
zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }
/* Double-length subtraction, slower but more accurate than SUB2. */
/* The macro produces a double-length */
/* number (z,zz) which satisfies approximately z+zz = (x+xx)-(y+yy). */
/* An error bound: abs(x+xx - (y+yy))*1.50e-31. (x,xx), (y,yy) */
/* are assumed to be double-length numbers. r,rr,s,ss,u,uu,w */
/* are temporary storage variables of type double. */
#define SUB2A(x,xx,y,yy,z,zz,r,rr,s,ss,u,uu,w) \
r=(x)-(y); \
if (ABS(x)>ABS(y)) { rr=((x)-r)-(y); s=(rr-(yy))+(xx); } \
else { rr=(x)-((y)+r); s=(rr+(xx))-(yy); } \
if (rr!=0.0) { \
z=r+s; zz=(r-z)+s; } \
else { \
ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)-(yy)) : ((xx)-((yy)+s)); \
u=r+s; \
uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
w=uu+ss; z=u+w; \
zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }

View file

@ -1,76 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************/
/* MODULE_NAME: doasin.c */
/* */
/* FUNCTION: doasin */
/* */
/* FILES NEEDED:endian.h mydefs.h dla.h doasin.h */
/* mpa.c */
/* */
/* Compute arcsin(x,dx,v) of double-length number (x+dx) the result */
/* stored in v where v= v[0]+v[1] =arcsin(x+dx) */
/**********************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "dla.h"
#include "math_private.h"
/********************************************************************/
/* Compute arcsin(x,dx,v) of double-length number (x+dx) the result */
/* stored in v where v= v[0]+v[1] =arcsin(x+dx) */
/********************************************************************/
void __doasin(double x, double dx, double v[]) {
#include "doasin.h"
static const double
d5 = 0.22372159090911789889975459505194491E-01,
d6 = 0.17352764422456822913014975683014622E-01,
d7 = 0.13964843843786693521653681033981614E-01,
d8 = 0.11551791438485242609036067259086589E-01,
d9 = 0.97622386568166960207425666787248914E-02,
d10 = 0.83638737193775788576092749009744976E-02,
d11 = 0.79470250400727425881446981833568758E-02;
double xx,p,pp,u,uu,r,s;
double hx,tx,hy,ty,tp,tq,tc,tcc;
/* Taylor series for arcsin for Double-Length numbers */
xx = x*x+2.0*x*dx;
p = ((((((d11*xx+d10)*xx+d9)*xx+d8)*xx+d7)*xx+d6)*xx+d5)*xx;
pp = 0;
MUL2(x,dx,x,dx,u,uu,tp,hx,tx,hy,ty,tq,tc,tcc);
ADD2(p,pp,c4.x,cc4.x,p,pp,r,s);
MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
ADD2(p,pp,c3.x,cc3.x,p,pp,r,s);
MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
ADD2(p,pp,c2.x,cc2.x,p,pp,r,s);
MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
ADD2(p,pp,c1.x,cc1.x,p,pp,r,s);
MUL2(p,pp,u,uu,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
MUL2(p,pp,x,dx,p,pp,tp,hx,tx,hy,ty,tq,tc,tcc);
ADD2(p,pp,x,dx,p,pp,r,s);
v[0]=p;
v[1]=pp; /* arcsin(x+dx)=v[0]+v[1] */
}

View file

@ -1,64 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: doasin.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef DOASIN_H
#define DOASIN_H
#ifdef BIG_ENDI
static const mynumber
/**/ c1 = {{0x3FC55555, 0x55555555}}, /* 0.16666666666666666 */
/**/ cc1 = {{0x3C655555, 0x55775389}}, /* 9.2518585419753846e-18 */
/**/ c2 = {{0x3FB33333, 0x33333333}}, /* 0.074999999999999997 */
/**/ cc2 = {{0x3C499993, 0x63F1A115}}, /* 2.7755472886508899e-18 */
/**/ c3 = {{0x3FA6DB6D, 0xB6DB6DB7}}, /* 0.044642857142857144 */
/**/ cc3 = {{0xBC320FC0, 0x3D5CF0C5}}, /* -9.7911734574147224e-19 */
/**/ c4 = {{0x3F9F1C71, 0xC71C71C5}}, /* 0.030381944444444437 */
/**/ cc4 = {{0xBC02B240, 0xFF23ED1E}}; /* -1.2669108566898312e-19 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ c1 = {{0x55555555, 0x3FC55555}}, /* 0.16666666666666666 */
/**/ cc1 = {{0x55775389, 0x3C655555}}, /* 9.2518585419753846e-18 */
/**/ c2 = {{0x33333333, 0x3FB33333}}, /* 0.074999999999999997 */
/**/ cc2 = {{0x63F1A115, 0x3C499993}}, /* 2.7755472886508899e-18 */
/**/ c3 = {{0xB6DB6DB7, 0x3FA6DB6D}}, /* 0.044642857142857144 */
/**/ cc3 = {{0x3D5CF0C5, 0xBC320FC0}}, /* -9.7911734574147224e-19 */
/**/ c4 = {{0xC71C71C5, 0x3F9F1C71}}, /* 0.030381944444444437 */
/**/ cc4 = {{0xFF23ED1E, 0xBC02B240}}; /* -1.2669108566898312e-19 */
#endif
#endif
#endif

View file

@ -1,189 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/********************************************************************/
/* */
/* MODULE_NAME: dosincos.c */
/* */
/* */
/* FUNCTIONS: dubsin */
/* dubcos */
/* docos */
/* FILES NEEDED: endian.h mydefs.h dla.h dosincos.h */
/* sincos.tbl */
/* */
/* Routines compute sin() and cos() as Double-Length numbers */
/********************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "sincos.tbl"
#include "dla.h"
#include "dosincos.h"
#include "math_private.h"
/***********************************************************************/
/* Routine receive Double-Length number (x+dx) and computing sin(x+dx) */
/* as Double-Length number and store it at array v .It computes it by */
/* arithmetic action on Double-Length numbers */
/*(x+dx) between 0 and PI/4 */
/***********************************************************************/
void __dubsin(double x, double dx, double v[]) {
double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
#if 0
double xx,y,yy,z,zz;
#endif
mynumber u;
int4 k;
u.x=x+big.x;
k = u.i[LOW_HALF]<<2;
x=x-(u.x-big.x);
d=x+dx;
dd=(x-d)+dx;
/* sin(x+dx)=sin(Xi+t)=sin(Xi)*cos(t) + cos(Xi)sin(t) where t ->0 */
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
sn=sincos.x[k]; /* */
ssn=sincos.x[k+1]; /* sin(Xi) and cos(Xi) */
cs=sincos.x[k+2]; /* */
ccs=sincos.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* Taylor */
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* series */
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* for sin */
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s); /* ds=sin(t) */
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc); ;/* Taylor */
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* series */
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* for cos */
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc); /* dc=cos(t) */
MUL2(cs,ccs,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,sn,ssn,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
SUB2(e,ee,dc,dcc,e,ee,r,s);
ADD2(e,ee,sn,ssn,e,ee,r,s); /* e+ee=sin(x+dx) */
v[0]=e;
v[1]=ee;
}
/**********************************************************************/
/* Routine receive Double-Length number (x+dx) and computes cos(x+dx) */
/* as Double-Length number and store it in array v .It computes it by */
/* arithmetic action on Double-Length numbers */
/*(x+dx) between 0 and PI/4 */
/**********************************************************************/
void __dubcos(double x, double dx, double v[]) {
double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
#if 0
double xx,y,yy,z,zz;
#endif
mynumber u;
int4 k;
u.x=x+big.x;
k = u.i[LOW_HALF]<<2;
x=x-(u.x-big.x);
d=x+dx;
dd=(x-d)+dx; /* cos(x+dx)=cos(Xi+t)=cos(Xi)cos(t) - sin(Xi)sin(t) */
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
sn=sincos.x[k]; /* */
ssn=sincos.x[k+1]; /* sin(Xi) and cos(Xi) */
cs=sincos.x[k+2]; /* */
ccs=sincos.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s);
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(cs,ccs,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,sn,ssn,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s3.x,ss3.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
MUL2(d,dd,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,d,dd,ds,dss,r,s);
MUL2(d2,dd2,c8.x,cc8.x,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c6.x,cc6.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c4.x,cc4.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(dc,dcc,c2.x,cc2.x,dc,dcc,r,s);
MUL2(d2,dd2,dc,dcc,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
MUL2(sn,ssn,ds,dss,e,ee,p,hx,tx,hy,ty,q,c,cc);
MUL2(dc,dcc,cs,ccs,dc,dcc,p,hx,tx,hy,ty,q,c,cc);
ADD2(e,ee,dc,dcc,e,ee,r,s);
SUB2(cs,ccs,e,ee,e,ee,r,s);
v[0]=e;
v[1]=ee;
}
/**********************************************************************/
/* Routine receive Double-Length number (x+dx) and computes cos(x+dx) */
/* as Double-Length number and store it in array v */
/**********************************************************************/
void __docos(double x, double dx, double v[]) {
double y,yy,p,w[2];
if (x>0) {y=x; yy=dx;}
else {y=-x; yy=-dx;}
if (y<0.5*hp0.x) /* y< PI/4 */
{__dubcos(y,yy,w); v[0]=w[0]; v[1]=w[1];}
else if (y<1.5*hp0.x) { /* y< 3/4 * PI */
p=hp0.x-y; /* p = PI/2 - y */
yy=hp1.x-yy;
y=p+yy;
yy=(p-y)+yy;
if (y>0) {__dubsin(y,yy,w); v[0]=w[0]; v[1]=w[1];}
/* cos(x) = sin ( 90 - x ) */
else {__dubsin(-y,-yy,w); v[0]=-w[0]; v[1]=-w[1];
}
}
else { /* y>= 3/4 * PI */
p=2.0*hp0.x-y; /* p = PI- y */
yy=2.0*hp1.x-yy;
y=p+yy;
yy=(p-y)+yy;
__dubcos(y,yy,w);
v[0]=-w[0];
v[1]=-w[1];
}
}

View file

@ -1,81 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: dosincos.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef DOSINCOS_H
#define DOSINCOS_H
#ifdef BIG_ENDI
static const mynumber
/**/ s3 = {{0xBFC55555, 0x55555555}},/* -0.16666666666666666 */
/**/ ss3 = {{0xBC6553AA, 0xE77EE482}},/* -9.2490366677784492e-18 */
/**/ s5 = {{0x3F811111, 0x11110F15}},/* 0.008333333333332452 */
/**/ ss5 = {{0xBC21AC06, 0xDA488820}},/* -4.7899996586987931e-19 */
/**/ s7 = {{0xBF2A019F, 0x5816C78D}},/* -0.00019841261022928957 */
/**/ ss7 = {{0x3BCDCEC9, 0x6A18BF2A}},/* 1.2624077757871259e-20 */
/**/ c2 = {{0x3FE00000, 0x00000000}},/* 0.5 */
/**/ cc2 = {{0xBA282FD8, 0x00000000}},/* -1.5264073330037701e-28 */
/**/ c4 = {{0xBFA55555, 0x55555555}},/* -0.041666666666666664 */
/**/ cc4 = {{0xBC4554BC, 0x2FFF257E}},/* -2.312711276085743e-18 */
/**/ c6 = {{0x3F56C16C, 0x16C16A96}},/* 0.0013888888888888055 */
/**/ cc6 = {{0xBBD2E846, 0xE6346F14}},/* -1.6015133010194884e-20 */
/**/ c8 = {{0xBEFA019F, 0x821D5987}},/* -2.480157866754367e-05 */
/**/ cc8 = {{0x3B7AB71E, 0x72FFE5CC}},/* 3.5357416224857556e-22 */
/**/ big = {{0x42c80000, 0x00000000}}, /* 52776558133248 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18}}, /* PI / 2 */
/**/ hp1 = {{0x3C91A626, 0x33145C07}}; /* 6.123233995736766e-17 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ s3 = {{0x55555555, 0xBFC55555}},/* -0.16666666666666666 */
/**/ ss3 = {{0xE77EE482, 0xBC6553AA}},/* -9.2490366677784492e-18 */
/**/ s5 = {{0x11110F15, 0x3F811111}},/* 0.008333333333332452 */
/**/ ss5 = {{0xDA488820, 0xBC21AC06}},/* -4.7899996586987931e-19 */
/**/ s7 = {{0x5816C78D, 0xBF2A019F}},/* -0.00019841261022928957 */
/**/ ss7 = {{0x6A18BF2A, 0x3BCDCEC9}},/* 1.2624077757871259e-20 */
/**/ c2 = {{0x00000000, 0x3FE00000}},/* 0.5 */
/**/ cc2 = {{0x00000000, 0xBA282FD8}},/* -1.5264073330037701e-28 */
/**/ c4 = {{0x55555555, 0xBFA55555}},/* -0.041666666666666664 */
/**/ cc4 = {{0x2FFF257E, 0xBC4554BC}},/* -2.312711276085743e-18 */
/**/ c6 = {{0x16C16A96, 0x3F56C16C}},/* 0.0013888888888888055 */
/**/ cc6 = {{0xE6346F14, 0xBBD2E846}},/* -1.6015133010194884e-20 */
/**/ c8 = {{0x821D5987, 0xBEFA019F}},/* -2.480157866754367e-05 */
/**/ cc8 = {{0x72FFE5CC, 0x3B7AB71E}},/* 3.5357416224857556e-22 */
/**/ big = {{0x00000000, 0x42c80000}}, /* 52776558133248 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB}}, /* PI / 2 */
/**/ hp1 = {{0x33145C07, 0x3C91A626}}; /* 6.123233995736766e-17 */
#endif
#endif
#endif

View file

@ -1,637 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* MODULE_NAME:uasncs.c */
/* */
/* FUNCTIONS: uasin */
/* uacos */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h usncs.h */
/* doasin.c sincos32.c dosincos.c mpa.c */
/* sincos.tbl asincos.tbl powtwo.tbl root.tbl */
/* */
/* Ultimate asin/acos routines. Given an IEEE double machine */
/* number x, compute the correctly rounded value of */
/* arcsin(x)or arccos(x) according to the function called. */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/******************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "asincos.tbl"
#include "root.tbl"
#include "powtwo.tbl"
#include "MathLib.h"
#include "uasncs.h"
#include "math_private.h"
void __doasin(double x, double dx, double w[]);
void __dubsin(double x, double dx, double v[]);
void __dubcos(double x, double dx, double v[]);
void __docos(double x, double dx, double v[]);
double __sin32(double x, double res, double res1);
double __cos32(double x, double res, double res1);
/***************************************************************************/
/* An ultimate asin routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of arcsin(x) */
/***************************************************************************/
double __ieee754_asin(double x){
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2];
mynumber u,v;
int4 k,m,n;
#if 0
int4 nn;
#endif
u.x = x;
m = u.i[HIGH_HALF];
k = 0x7fffffff&m; /* no sign */
if (k < 0x3e500000) return x; /* for x->0 => sin(x)=x */
/*----------------------2^-26 <= |x| < 2^ -3 -----------------*/
else
if (k < 0x3fc00000) {
x2 = x*x;
t = (((((f6*x2 + f5)*x2 + f4)*x2 + f3)*x2 + f2)*x2 + f1)*(x2*x);
res = x+t; /* res=arcsin(x) according to Taylor series */
cor = (x-res)+t;
if (res == res+1.025*cor) return res;
else {
x1 = x+big;
xx = x*x;
x1 -= big;
x2 = x - x1;
p = x1*x1*x1;
s1 = a1.x*p;
s2 = ((((((c7*xx + c6)*xx + c5)*xx + c4)*xx + c3)*xx + c2)*xx*xx*x +
((a1.x+a2.x)*x2*x2+ 0.5*x1*x)*x2) + a2.x*p;
res1 = x+s1;
s2 = ((x-res1)+s1)+s2;
res = res1+s2;
cor = (res1-res)+s2;
if (res == res+1.00014*cor) return res;
else {
__doasin(x,0,w);
if (w[0]==(w[0]+1.00000001*w[1])) return w[0];
else {
y=ABS(x);
res=ABS(w[0]);
res1=ABS(w[0]+1.1*w[1]);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
}
/*---------------------0.125 <= |x| < 0.5 -----------------------------*/
else if (k < 0x3fe00000) {
if (k<0x3fd00000) n = 11*((k&0x000fffff)>>15);
else n = 11*((k&0x000fffff)>>14)+352;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+xx*(asncs.x[n+5]
+xx*asncs.x[n+6]))))+asncs.x[n+7];
t+=p;
res =asncs.x[n+8] +t;
cor = (asncs.x[n+8]-res)+t;
if (res == res+1.05*cor) return (m>0)?res:-res;
else {
r=asncs.x[n+8]+xx*asncs.x[n+9];
t=((asncs.x[n+8]-r)+xx*asncs.x[n+9])+(p+xx*asncs.x[n+10]);
res = r+t;
cor = (r-res)+t;
if (res == res+1.0005*cor) return (m>0)?res:-res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__dubsin(res,z,w);
z=(w[0]-ABS(x))+w[1];
if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1);
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
} /* else if (k < 0x3fe00000) */
/*-------------------- 0.5 <= |x| < 0.75 -----------------------------*/
else
if (k < 0x3fe80000) {
n = 1056+((k&0x000fe000)>>11)*3;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+xx*(asncs.x[n+5]
+xx*(asncs.x[n+6]+xx*asncs.x[n+7])))))+asncs.x[n+8];
t+=p;
res =asncs.x[n+9] +t;
cor = (asncs.x[n+9]-res)+t;
if (res == res+1.01*cor) return (m>0)?res:-res;
else {
r=asncs.x[n+9]+xx*asncs.x[n+10];
t=((asncs.x[n+9]-r)+xx*asncs.x[n+10])+(p+xx*asncs.x[n+11]);
res = r+t;
cor = (r-res)+t;
if (res == res+1.0005*cor) return (m>0)?res:-res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__dubsin(res,z,w);
z=(w[0]-ABS(x))+w[1];
if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1);
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
} /* else if (k < 0x3fe80000) */
/*--------------------- 0.75 <= |x|< 0.921875 ----------------------*/
else
if (k < 0x3fed8000) {
n = 992+((k&0x000fe000)>>13)*13;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+xx*(asncs.x[n+5]
+xx*(asncs.x[n+6]+xx*(asncs.x[n+7]+xx*asncs.x[n+8]))))))+asncs.x[n+9];
t+=p;
res =asncs.x[n+10] +t;
cor = (asncs.x[n+10]-res)+t;
if (res == res+1.01*cor) return (m>0)?res:-res;
else {
r=asncs.x[n+10]+xx*asncs.x[n+11];
t=((asncs.x[n+10]-r)+xx*asncs.x[n+11])+(p+xx*asncs.x[n+12]);
res = r+t;
cor = (r-res)+t;
if (res == res+1.0008*cor) return (m>0)?res:-res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
y=hp0.x-res;
z=((hp0.x-y)-res)+(hp1.x-z);
__dubcos(y,z,w);
z=(w[0]-ABS(x))+w[1];
if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1);
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
} /* else if (k < 0x3fed8000) */
/*-------------------0.921875 <= |x| < 0.953125 ------------------------*/
else
if (k < 0x3fee8000) {
n = 884+((k&0x000fe000)>>13)*14;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
xx*asncs.x[n+9])))))))+asncs.x[n+10];
t+=p;
res =asncs.x[n+11] +t;
cor = (asncs.x[n+11]-res)+t;
if (res == res+1.01*cor) return (m>0)?res:-res;
else {
r=asncs.x[n+11]+xx*asncs.x[n+12];
t=((asncs.x[n+11]-r)+xx*asncs.x[n+12])+(p+xx*asncs.x[n+13]);
res = r+t;
cor = (r-res)+t;
if (res == res+1.0007*cor) return (m>0)?res:-res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
y=(hp0.x-res)-z;
z=y+hp1.x;
y=(y-z)+hp1.x;
__dubcos(z,y,w);
z=(w[0]-ABS(x))+w[1];
if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1);
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
} /* else if (k < 0x3fee8000) */
/*--------------------0.953125 <= |x| < 0.96875 ------------------------*/
else
if (k < 0x3fef0000) {
n = 768+((k&0x000fe000)>>13)*15;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
xx*(asncs.x[n+9]+xx*asncs.x[n+10]))))))))+asncs.x[n+11];
t+=p;
res =asncs.x[n+12] +t;
cor = (asncs.x[n+12]-res)+t;
if (res == res+1.01*cor) return (m>0)?res:-res;
else {
r=asncs.x[n+12]+xx*asncs.x[n+13];
t=((asncs.x[n+12]-r)+xx*asncs.x[n+13])+(p+xx*asncs.x[n+14]);
res = r+t;
cor = (r-res)+t;
if (res == res+1.0007*cor) return (m>0)?res:-res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
y=(hp0.x-res)-z;
z=y+hp1.x;
y=(y-z)+hp1.x;
__dubcos(z,y,w);
z=(w[0]-ABS(x))+w[1];
if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1);
else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1);
else {
y=ABS(x);
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
}
} /* else if (k < 0x3fef0000) */
/*--------------------0.96875 <= |x| < 1 --------------------------------*/
else
if (k<0x3ff00000) {
z = 0.5*((m>0)?(1.0-x):(1.0+x));
v.x=z;
k=v.i[HIGH_HALF];
t=inroot[(k&0x001fffff)>>14]*powtwo[511-(k>>21)];
r=1.0-t*t*z;
t = t*(rt0+r*(rt1+r*(rt2+r*rt3)));
c=t*z;
t=c*(1.5-0.5*t*c);
y=(c+t24)-t24;
cc = (z-y*y)/(t+y);
p=(((((f6*z+f5)*z+f4)*z+f3)*z+f2)*z+f1)*z;
cor = (hp1.x - 2.0*cc)-2.0*(y+cc)*p;
res1 = hp0.x - 2.0*y;
res =res1 + cor;
if (res == res+1.003*((res1-res)+cor)) return (m>0)?res:-res;
else {
c=y+cc;
cc=(y-c)+cc;
__doasin(c,cc,w);
res1=hp0.x-2.0*w[0];
cor=((hp0.x-res1)-2.0*w[0])+(hp1.x-2.0*w[1]);
res = res1+cor;
cor = (res1-res)+cor;
if (res==(res+1.0000001*cor)) return (m>0)?res:-res;
else {
y=ABS(x);
res1=res+1.1*cor;
return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1);
}
}
} /* else if (k < 0x3ff00000) */
/*---------------------------- |x|>=1 -------------------------------*/
else if (k==0x3ff00000 && u.i[LOW_HALF]==0) return (m>0)?hp0.x:-hp0.x;
else
if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x;
else {
u.i[HIGH_HALF]=0x7ff00000;
v.i[HIGH_HALF]=0x7ff00000;
u.i[LOW_HALF]=0;
v.i[LOW_HALF]=0;
return u.x/v.x; /* NaN */
}
}
/*******************************************************************/
/* */
/* End of arcsine, below is arccosine */
/* */
/*******************************************************************/
double __ieee754_acos(double x)
{
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2],eps;
#if 0
double fc;
#endif
mynumber u,v;
int4 k,m,n;
#if 0
int4 nn;
#endif
u.x = x;
m = u.i[HIGH_HALF];
k = 0x7fffffff&m;
/*------------------- |x|<2.77556*10^-17 ----------------------*/
if (k < 0x3c880000) return hp0.x;
/*----------------- 2.77556*10^-17 <= |x| < 2^-3 --------------*/
else
if (k < 0x3fc00000) {
x2 = x*x;
t = (((((f6*x2 + f5)*x2 + f4)*x2 + f3)*x2 + f2)*x2 + f1)*(x2*x);
r=hp0.x-x;
cor=(((hp0.x-r)-x)+hp1.x)-t;
res = r+cor;
cor = (r-res)+cor;
if (res == res+1.004*cor) return res;
else {
x1 = x+big;
xx = x*x;
x1 -= big;
x2 = x - x1;
p = x1*x1*x1;
s1 = a1.x*p;
s2 = ((((((c7*xx + c6)*xx + c5)*xx + c4)*xx + c3)*xx + c2)*xx*xx*x +
((a1.x+a2.x)*x2*x2+ 0.5*x1*x)*x2) + a2.x*p;
res1 = x+s1;
s2 = ((x-res1)+s1)+s2;
r=hp0.x-res1;
cor=(((hp0.x-r)-res1)+hp1.x)-s2;
res = r+cor;
cor = (r-res)+cor;
if (res == res+1.00004*cor) return res;
else {
__doasin(x,0,w);
r=hp0.x-w[0];
cor=((hp0.x-r)-w[0])+(hp1.x-w[1]);
res=r+cor;
cor=(r-res)+cor;
if (res ==(res +1.00000001*cor)) return res;
else {
res1=res+1.1*cor;
return __cos32(x,res,res1);
}
}
}
} /* else if (k < 0x3fc00000) */
/*---------------------- 0.125 <= |x| < 0.5 --------------------*/
else
if (k < 0x3fe00000) {
if (k<0x3fd00000) n = 11*((k&0x000fffff)>>15);
else n = 11*((k&0x000fffff)>>14)+352;
if (m>0) xx = x - asncs.x[n];
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*asncs.x[n+6]))))+asncs.x[n+7];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+8]):(hp0.x+asncs.x[n+8]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
res = y+t;
if (res == res+1.02*((y-res)+t)) return res;
else {
r=asncs.x[n+8]+xx*asncs.x[n+9];
t=((asncs.x[n+8]-r)+xx*asncs.x[n+9])+(p+xx*asncs.x[n+10]);
if (m>0)
{p = hp0.x-r; t = (((hp0.x-p)-r)-t)+hp1.x; }
else
{p = hp0.x+r; t = ((hp0.x-p)+r)+(hp1.x+t); }
res = p+t;
cor = (p-res)+t;
if (res == (res+1.0002*cor)) return res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__docos(res,z,w);
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fe00000) */
/*--------------------------- 0.5 <= |x| < 0.75 ---------------------*/
else
if (k < 0x3fe80000) {
n = 1056+((k&0x000fe000)>>11)*3;
if (m>0) {xx = x - asncs.x[n]; eps=1.04; }
else {xx = -x - asncs.x[n]; eps=1.02; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+
xx*asncs.x[n+7])))))+asncs.x[n+8];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+9]):(hp0.x+asncs.x[n+9]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
res = y+t;
if (res == res+eps*((y-res)+t)) return res;
else {
r=asncs.x[n+9]+xx*asncs.x[n+10];
t=((asncs.x[n+9]-r)+xx*asncs.x[n+10])+(p+xx*asncs.x[n+11]);
if (m>0) {p = hp0.x-r; t = (((hp0.x-p)-r)-t)+hp1.x; eps=1.0004; }
else {p = hp0.x+r; t = ((hp0.x-p)+r)+(hp1.x+t); eps=1.0002; }
res = p+t;
cor = (p-res)+t;
if (res == (res+eps*cor)) return res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__docos(res,z,w);
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fe80000) */
/*------------------------- 0.75 <= |x| < 0.921875 -------------*/
else
if (k < 0x3fed8000) {
n = 992+((k&0x000fe000)>>13)*13;
if (m>0) {xx = x - asncs.x[n]; eps = 1.04; }
else {xx = -x - asncs.x[n]; eps = 1.01; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+xx*(asncs.x[n+7]+
xx*asncs.x[n+8]))))))+asncs.x[n+9];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+10]):(hp0.x+asncs.x[n+10]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
res = y+t;
if (res == res+eps*((y-res)+t)) return res;
else {
r=asncs.x[n+10]+xx*asncs.x[n+11];
t=((asncs.x[n+10]-r)+xx*asncs.x[n+11])+(p+xx*asncs.x[n+12]);
if (m>0) {p = hp0.x-r; t = (((hp0.x-p)-r)-t)+hp1.x; eps=1.0032; }
else {p = hp0.x+r; t = ((hp0.x-p)+r)+(hp1.x+t); eps=1.0008; }
res = p+t;
cor = (p-res)+t;
if (res == (res+eps*cor)) return res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__docos(res,z,w);
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fed8000) */
/*-------------------0.921875 <= |x| < 0.953125 ------------------*/
else
if (k < 0x3fee8000) {
n = 884+((k&0x000fe000)>>13)*14;
if (m>0) {xx = x - asncs.x[n]; eps=1.04; }
else {xx = -x - asncs.x[n]; eps =1.005; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
xx*asncs.x[n+9])))))))+asncs.x[n+10];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+11]):(hp0.x+asncs.x[n+11]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
res = y+t;
if (res == res+eps*((y-res)+t)) return res;
else {
r=asncs.x[n+11]+xx*asncs.x[n+12];
t=((asncs.x[n+11]-r)+xx*asncs.x[n+12])+(p+xx*asncs.x[n+13]);
if (m>0) {p = hp0.x-r; t = (((hp0.x-p)-r)-t)+hp1.x; eps=1.0030; }
else {p = hp0.x+r; t = ((hp0.x-p)+r)+(hp1.x+t); eps=1.0005; }
res = p+t;
cor = (p-res)+t;
if (res == (res+eps*cor)) return res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__docos(res,z,w);
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fee8000) */
/*--------------------0.953125 <= |x| < 0.96875 ----------------*/
else
if (k < 0x3fef0000) {
n = 768+((k&0x000fe000)>>13)*15;
if (m>0) {xx = x - asncs.x[n]; eps=1.04; }
else {xx = -x - asncs.x[n]; eps=1.005;}
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+xx*(asncs.x[n+9]+
xx*asncs.x[n+10]))))))))+asncs.x[n+11];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+12]):(hp0.x+asncs.x[n+12]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
res = y+t;
if (res == res+eps*((y-res)+t)) return res;
else {
r=asncs.x[n+12]+xx*asncs.x[n+13];
t=((asncs.x[n+12]-r)+xx*asncs.x[n+13])+(p+xx*asncs.x[n+14]);
if (m>0) {p = hp0.x-r; t = (((hp0.x-p)-r)-t)+hp1.x; eps=1.0030; }
else {p = hp0.x+r; t = ((hp0.x-p)+r)+(hp1.x+t); eps=1.0005; }
res = p+t;
cor = (p-res)+t;
if (res == (res+eps*cor)) return res;
else {
res1=res+1.1*cor;
z=0.5*(res1-res);
__docos(res,z,w);
z=(w[0]-x)+w[1];
if (z>1.0e-27) return max(res,res1);
else if (z<-1.0e-27) return min(res,res1);
else return __cos32(x,res,res1);
}
}
} /* else if (k < 0x3fef0000) */
/*-----------------0.96875 <= |x| < 1 ---------------------------*/
else
if (k<0x3ff00000) {
z = 0.5*((m>0)?(1.0-x):(1.0+x));
v.x=z;
k=v.i[HIGH_HALF];
t=inroot[(k&0x001fffff)>>14]*powtwo[511-(k>>21)];
r=1.0-t*t*z;
t = t*(rt0+r*(rt1+r*(rt2+r*rt3)));
c=t*z;
t=c*(1.5-0.5*t*c);
y = (t27*c+c)-t27*c;
cc = (z-y*y)/(t+y);
p=(((((f6*z+f5)*z+f4)*z+f3)*z+f2)*z+f1)*z;
if (m<0) {
cor = (hp1.x - cc)-(y+cc)*p;
res1 = hp0.x - y;
res =res1 + cor;
if (res == res+1.002*((res1-res)+cor)) return (res+res);
else {
c=y+cc;
cc=(y-c)+cc;
__doasin(c,cc,w);
res1=hp0.x-w[0];
cor=((hp0.x-res1)-w[0])+(hp1.x-w[1]);
res = res1+cor;
cor = (res1-res)+cor;
if (res==(res+1.000001*cor)) return (res+res);
else {
res=res+res;
res1=res+1.2*cor;
return __cos32(x,res,res1);
}
}
}
else {
cor = cc+p*(y+cc);
res = y + cor;
if (res == res+1.03*((y-res)+cor)) return (res+res);
else {
c=y+cc;
cc=(y-c)+cc;
__doasin(c,cc,w);
res = w[0];
cor=w[1];
if (res==(res+1.000001*cor)) return (res+res);
else {
res=res+res;
res1=res+1.2*cor;
return __cos32(x,res,res1);
}
}
}
} /* else if (k < 0x3ff00000) */
/*---------------------------- |x|>=1 -----------------------*/
else
if (k==0x3ff00000 && u.i[LOW_HALF]==0) return (m>0)?0:2.0*hp0.x;
else
if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x;
else {
u.i[HIGH_HALF]=0x7ff00000;
v.i[HIGH_HALF]=0x7ff00000;
u.i[LOW_HALF]=0;
v.i[LOW_HALF]=0;
return u.x/v.x;
}
}

View file

@ -1,406 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat2.c */
/* */
/* FUNCTIONS: uatan2 */
/* atan2Mp */
/* signArctan2 */
/* normalized */
/* */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h atnat2.h */
/* mpatan.c mpatan2.c mpsqrt.c */
/* uatan.tbl */
/* */
/* An ultimate atan2() routine. Given two IEEE double machine numbers y,*/
/* x it computes the correctly rounded (to nearest) value of atan2(y,x).*/
/* */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/************************************************************************/
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
#include "uatan.tbl"
#include "atnat2.h"
#include "math_private.h"
/************************************************************************/
/* An ultimate atan2 routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of atan2(y,x). */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/************************************************************************/
static double atan2Mp(double ,double ,const int[]);
static double signArctan2(double ,double);
static double normalized(double ,double,double ,double);
void __mpatan2(mp_no *,mp_no *,mp_no *,int);
double __ieee754_atan2(double y,double x) {
int i,de,ux,dx,uy,dy;
#if 0
int p;
#endif
static const int pr[MM]={6,8,10,20,32};
double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t4,t5,t6,t7,t8,
z,zz,cor,s1,ss1,s2,ss2;
#if 0
double z1,z2;
#endif
number num;
#if 0
mp_no mperr,mpt1,mpx,mpy,mpz,mpz1,mpz2;
#endif
static const int ep= 59768832, /* 57*16**5 */
em=-59768832; /* -57*16**5 */
/* x=NaN or y=NaN */
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
if ((ux&0x7ff00000) ==0x7ff00000) {
if (((ux&0x000fffff)|dx)!=0x00000000) return x+x; }
num.d = y; uy = num.i[HIGH_HALF]; dy = num.i[LOW_HALF];
if ((uy&0x7ff00000) ==0x7ff00000) {
if (((uy&0x000fffff)|dy)!=0x00000000) return y+y; }
/* y=+-0 */
if (uy==0x00000000) {
if (dy==0x00000000) {
if ((ux&0x80000000)==0x00000000) return ZERO;
else return opi.d; } }
else if (uy==0x80000000) {
if (dy==0x00000000) {
if ((ux&0x80000000)==0x00000000) return MZERO;
else return mopi.d;} }
/* x=+-0 */
if (x==ZERO) {
if ((uy&0x80000000)==0x00000000) return hpi.d;
else return mhpi.d; }
/* x=+-INF */
if (ux==0x7ff00000) {
if (dx==0x00000000) {
if (uy==0x7ff00000) {
if (dy==0x00000000) return qpi.d; }
else if (uy==0xfff00000) {
if (dy==0x00000000) return mqpi.d; }
else {
if ((uy&0x80000000)==0x00000000) return ZERO;
else return MZERO; }
}
}
else if (ux==0xfff00000) {
if (dx==0x00000000) {
if (uy==0x7ff00000) {
if (dy==0x00000000) return tqpi.d; }
else if (uy==0xfff00000) {
if (dy==0x00000000) return mtqpi.d; }
else {
if ((uy&0x80000000)==0x00000000) return opi.d;
else return mopi.d; }
}
}
/* y=+-INF */
if (uy==0x7ff00000) {
if (dy==0x00000000) return hpi.d; }
else if (uy==0xfff00000) {
if (dy==0x00000000) return mhpi.d; }
/* either x/y or y/x is very close to zero */
ax = (x<ZERO) ? -x : x; ay = (y<ZERO) ? -y : y;
de = (uy & 0x7ff00000) - (ux & 0x7ff00000);
if (de>=ep) { return ((y>ZERO) ? hpi.d : mhpi.d); }
else if (de<=em) {
if (x>ZERO) {
if ((z=ay/ax)<TWOM1022) return normalized(ax,ay,y,z);
else return signArctan2(y,z); }
else { return ((y>ZERO) ? opi.d : mopi.d); } }
/* if either x or y is extremely close to zero, scale abs(x), abs(y). */
if (ax<twom500.d || ay<twom500.d) { ax*=two500.d; ay*=two500.d; }
/* x,y which are neither special nor extreme */
if (ay<ax) {
u=ay/ax;
EMULV(ax,u,v,vv,t1,t2,t3,t4,t5)
du=((ay-v)-vv)/ax; }
else {
u=ax/ay;
EMULV(ay,u,v,vv,t1,t2,t3,t4,t5)
du=((ax-v)-vv)/ay; }
if (x>ZERO) {
/* (i) x>0, abs(y)< abs(x): atan(ay/ax) */
if (ay<ax) {
if (u<inv16.d) {
v=u*u; zz=du+u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
if ((z=u+(zz-u1.d*u)) == u+(zz+u1.d*u)) return signArctan2(y,z);
MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
if ((z=s1+(ss1-u5.d*s1)) == s1+(ss1+u5.d*s1)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
else {
i=(TWO52+TWO8*u)-TWO52; i-=16;
t3=u-cij[i][0].d;
EADD(t3,du,v,dv)
t1=cij[i][1].d; t2=cij[i][2].d;
zz=v*t2+(dv*t2+v*v*(cij[i][3].d+v*(cij[i][4].d+
v*(cij[i][5].d+v* cij[i][6].d))));
if (i<112) {
if (i<48) u9=u91.d; /* u < 1/4 */
else u9=u92.d; } /* 1/4 <= u < 1/2 */
else {
if (i<176) u9=u93.d; /* 1/2 <= u < 3/4 */
else u9=u94.d; } /* 3/4 <= u <= 1 */
if ((z=t1+(zz-u9*t1)) == t1+(zz+u9*t1)) return signArctan2(y,z);
t1=u-hij[i][0].d;
EADD(t1,du,v,vv)
s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
v*(hij[i][14].d+v* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
if ((z=s2+(ss2-ub.d*s2)) == s2+(ss2+ub.d*s2)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
}
/* (ii) x>0, abs(x)<=abs(y): pi/2-atan(ax/ay) */
else {
if (u<inv16.d) {
v=u*u;
zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
ESUB(hpi.d,u,t2,cor)
t3=((hpi1.d+cor)-du)-zz;
if ((z=t2+(t3-u2.d)) == t2+(t3+u2.d)) return signArctan2(y,z);
MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
SUB2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
if ((z=s2+(ss2-u6.d)) == s2+(ss2+u6.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
else {
i=(TWO52+TWO8*u)-TWO52; i-=16;
v=(u-cij[i][0].d)+du;
zz=hpi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
v*(cij[i][5].d+v* cij[i][6].d))));
t1=hpi.d-cij[i][1].d;
if (i<112) ua=ua1.d; /* w < 1/2 */
else ua=ua2.d; /* w >= 1/2 */
if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
t1=u-hij[i][0].d;
EADD(t1,du,v,vv)
s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
v*(hij[i][14].d+v* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
SUB2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
}
}
else {
/* (iii) x<0, abs(x)< abs(y): pi/2+atan(ax/ay) */
if (ax<ay) {
if (u<inv16.d) {
v=u*u;
zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
EADD(hpi.d,u,t2,cor)
t3=((hpi1.d+cor)+du)+zz;
if ((z=t2+(t3-u3.d)) == t2+(t3+u3.d)) return signArctan2(y,z);
MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
ADD2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
if ((z=s2+(ss2-u7.d)) == s2+(ss2+u7.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
else {
i=(TWO52+TWO8*u)-TWO52; i-=16;
v=(u-cij[i][0].d)+du;
zz=hpi1.d+v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
v*(cij[i][5].d+v* cij[i][6].d))));
t1=hpi.d+cij[i][1].d;
if (i<112) ua=ua1.d; /* w < 1/2 */
else ua=ua2.d; /* w >= 1/2 */
if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
t1=u-hij[i][0].d;
EADD(t1,du,v,vv)
s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
v*(hij[i][14].d+v* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
ADD2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
}
/* (iv) x<0, abs(y)<=abs(x): pi-atan(ax/ay) */
else {
if (u<inv16.d) {
v=u*u;
zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
ESUB(opi.d,u,t2,cor)
t3=((opi1.d+cor)-du)-zz;
if ((z=t2+(t3-u4.d)) == t2+(t3+u4.d)) return signArctan2(y,z);
MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
SUB2(opi.d,opi1.d,s1,ss1,s2,ss2,t1,t2)
if ((z=s2+(ss2-u8.d)) == s2+(ss2+u8.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
else {
i=(TWO52+TWO8*u)-TWO52; i-=16;
v=(u-cij[i][0].d)+du;
zz=opi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
v*(cij[i][5].d+v* cij[i][6].d))));
t1=opi.d-cij[i][1].d;
if (i<112) ua=ua1.d; /* w < 1/2 */
else ua=ua2.d; /* w >= 1/2 */
if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
t1=u-hij[i][0].d;
EADD(t1,du,v,vv)
s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
v*(hij[i][14].d+v* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
SUB2(opi.d,opi1.d,s2,ss2,s1,ss1,t1,t2)
if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
return atan2Mp(x,y,pr);
}
}
}
}
/* Treat the Denormalized case */
static double normalized(double ax,double ay,double y, double z)
{ int p;
mp_no mpx,mpy,mpz,mperr,mpz2,mpt1;
p=6;
__dbl_mp(ax,&mpx,p); __dbl_mp(ay,&mpy,p); __dvd(&mpy,&mpx,&mpz,p);
__dbl_mp(ue.d,&mpt1,p); __mul(&mpz,&mpt1,&mperr,p);
__sub(&mpz,&mperr,&mpz2,p); __mp_dbl(&mpz2,&z,p);
return signArctan2(y,z);
}
/* Fix the sign and return after stage 1 or stage 2 */
static double signArctan2(double y,double z)
{
return ((y<ZERO) ? -z : z);
}
/* Stage 3: Perform a multi-Precision computation */
static double atan2Mp(double x,double y,const int pr[])
{
double z1,z2;
int i,p;
mp_no mpx,mpy,mpz,mpz1,mpz2,mperr,mpt1;
for (i=0; i<MM; i++) {
p = pr[i];
__dbl_mp(x,&mpx,p); __dbl_mp(y,&mpy,p);
__mpatan2(&mpy,&mpx,&mpz,p);
__dbl_mp(ud[i].d,&mpt1,p); __mul(&mpz,&mpt1,&mperr,p);
__add(&mpz,&mperr,&mpz1,p); __sub(&mpz,&mperr,&mpz2,p);
__mp_dbl(&mpz1,&z1,p); __mp_dbl(&mpz2,&z2,p);
if (z1==z2) return z1;
}
return z1; /*if unpossible to do exact computing */
}

View file

@ -1,252 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/***************************************************************************/
/* MODULE_NAME:uexp.c */
/* */
/* FUNCTION:uexp */
/* exp1 */
/* */
/* FILES NEEDED:dla.h endian.h mpa.h mydefs.h uexp.h */
/* mpa.c mpexp.x slowexp.c */
/* */
/* An ultimate exp routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of e^x */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/***************************************************************************/
#include "endian.h"
#include "uexp.h"
#include "mydefs.h"
#include "MathLib.h"
#include "uexp.tbl"
#include "math_private.h"
double __slowexp(double);
/***************************************************************************/
/* An ultimate exp routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of e^x */
/***************************************************************************/
double __ieee754_exp(double x) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
int4 k;
#endif
int4 i,j,m,n,ex;
junk1.x = x;
m = junk1.i[HIGH_HALF];
n = m&hugeint;
if (n > smallint && n < bigint) {
y = x*log2e.x + three51.x;
bexp = y - three51.x; /* multiply the result by 2**bexp */
junk1.x = y;
eps = bexp*ln_two2.x; /* x = bexp*ln(2) + t - eps */
t = x - bexp*ln_two1.x;
y = t + three33.x;
base = y - three33.x; /* t rounded to a multiple of 2**-18 */
junk2.x = y;
del = (t - base) - eps; /* x = bexp*ln(2) + base + del */
eps = del + del*del*(p3.x*del + p2.x);
binexp.i[HIGH_HALF] =(junk1.i[LOW_HALF]+1023)<<20;
i = ((junk2.i[LOW_HALF]>>8)&0xfffffffe)+356;
j = (junk2.i[LOW_HALF]&511)<<1;
al = coar.x[i]*fine.x[j];
bet =(coar.x[i]*fine.x[j+1] + coar.x[i+1]*fine.x[j]) + coar.x[i+1]*fine.x[j+1];
rem=(bet + bet*eps)+al*eps;
res = al + rem;
cor = (al - res) + rem;
if (res == (res+cor*err_0)) return res*binexp.x;
else return __slowexp(x); /*if error is over bound */
}
if (n <= smallint) return 1.0;
if (n >= badint) {
if (n > infint) return(x+x); /* x is NaN */
if (n < infint) return ( (x>0) ? (hhuge*hhuge) : (tiny*tiny) );
/* x is finite, cause either overflow or underflow */
if (junk1.i[LOW_HALF] != 0) return (x+x); /* x is NaN */
return ((x>0)?inf.x:zero ); /* |x| = inf; return either inf or 0 */
}
y = x*log2e.x + three51.x;
bexp = y - three51.x;
junk1.x = y;
eps = bexp*ln_two2.x;
t = x - bexp*ln_two1.x;
y = t + three33.x;
base = y - three33.x;
junk2.x = y;
del = (t - base) - eps;
eps = del + del*del*(p3.x*del + p2.x);
i = ((junk2.i[LOW_HALF]>>8)&0xfffffffe)+356;
j = (junk2.i[LOW_HALF]&511)<<1;
al = coar.x[i]*fine.x[j];
bet =(coar.x[i]*fine.x[j+1] + coar.x[i+1]*fine.x[j]) + coar.x[i+1]*fine.x[j+1];
rem=(bet + bet*eps)+al*eps;
res = al + rem;
cor = (al - res) + rem;
if (m>>31) {
ex=junk1.i[LOW_HALF];
if (res < 1.0) {res+=res; cor+=cor; ex-=1;}
if (ex >=-1022) {
binexp.i[HIGH_HALF] = (1023+ex)<<20;
if (res == (res+cor*err_0)) return res*binexp.x;
else return __slowexp(x); /*if error is over bound */
}
ex = -(1022+ex);
binexp.i[HIGH_HALF] = (1023-ex)<<20;
res*=binexp.x;
cor*=binexp.x;
eps=1.0000000001+err_0*binexp.x;
t=1.0+res;
y = ((1.0-t)+res)+cor;
res=t+y;
cor = (t-res)+y;
if (res == (res + eps*cor))
{ binexp.i[HIGH_HALF] = 0x00100000;
return (res-1.0)*binexp.x;
}
else return __slowexp(x); /* if error is over bound */
}
else {
binexp.i[HIGH_HALF] =(junk1.i[LOW_HALF]+767)<<20;
if (res == (res+cor*err_0)) return res*binexp.x*t256.x;
else return __slowexp(x);
}
}
/************************************************************************/
/* Compute e^(x+xx)(Double-Length number) .The routine also receive */
/* bound of error of previous calculation .If after computing exp */
/* error bigger than allows routine return non positive number */
/*else return e^(x + xx) (always positive ) */
/************************************************************************/
double __exp1(double x, double xx, double error) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
int4 k;
#endif
int4 i,j,m,n,ex;
junk1.x = x;
m = junk1.i[HIGH_HALF];
n = m&hugeint; /* no sign */
if (n > smallint && n < bigint) {
y = x*log2e.x + three51.x;
bexp = y - three51.x; /* multiply the result by 2**bexp */
junk1.x = y;
eps = bexp*ln_two2.x; /* x = bexp*ln(2) + t - eps */
t = x - bexp*ln_two1.x;
y = t + three33.x;
base = y - three33.x; /* t rounded to a multiple of 2**-18 */
junk2.x = y;
del = (t - base) + (xx-eps); /* x = bexp*ln(2) + base + del */
eps = del + del*del*(p3.x*del + p2.x);
binexp.i[HIGH_HALF] =(junk1.i[LOW_HALF]+1023)<<20;
i = ((junk2.i[LOW_HALF]>>8)&0xfffffffe)+356;
j = (junk2.i[LOW_HALF]&511)<<1;
al = coar.x[i]*fine.x[j];
bet =(coar.x[i]*fine.x[j+1] + coar.x[i+1]*fine.x[j]) + coar.x[i+1]*fine.x[j+1];
rem=(bet + bet*eps)+al*eps;
res = al + rem;
cor = (al - res) + rem;
if (res == (res+cor*(1.0+error+err_1))) return res*binexp.x;
else return -10.0;
}
if (n <= smallint) return 1.0; /* if x->0 e^x=1 */
if (n >= badint) {
if (n > infint) return(zero/zero); /* x is NaN, return invalid */
if (n < infint) return ( (x>0) ? (hhuge*hhuge) : (tiny*tiny) );
/* x is finite, cause either overflow or underflow */
if (junk1.i[LOW_HALF] != 0) return (zero/zero); /* x is NaN */
return ((x>0)?inf.x:zero ); /* |x| = inf; return either inf or 0 */
}
y = x*log2e.x + three51.x;
bexp = y - three51.x;
junk1.x = y;
eps = bexp*ln_two2.x;
t = x - bexp*ln_two1.x;
y = t + three33.x;
base = y - three33.x;
junk2.x = y;
del = (t - base) + (xx-eps);
eps = del + del*del*(p3.x*del + p2.x);
i = ((junk2.i[LOW_HALF]>>8)&0xfffffffe)+356;
j = (junk2.i[LOW_HALF]&511)<<1;
al = coar.x[i]*fine.x[j];
bet =(coar.x[i]*fine.x[j+1] + coar.x[i+1]*fine.x[j]) + coar.x[i+1]*fine.x[j+1];
rem=(bet + bet*eps)+al*eps;
res = al + rem;
cor = (al - res) + rem;
if (m>>31) {
ex=junk1.i[LOW_HALF];
if (res < 1.0) {res+=res; cor+=cor; ex-=1;}
if (ex >=-1022) {
binexp.i[HIGH_HALF] = (1023+ex)<<20;
if (res == (res+cor*(1.0+error+err_1))) return res*binexp.x;
else return -10.0;
}
ex = -(1022+ex);
binexp.i[HIGH_HALF] = (1023-ex)<<20;
res*=binexp.x;
cor*=binexp.x;
eps=1.00000000001+(error+err_1)*binexp.x;
t=1.0+res;
y = ((1.0-t)+res)+cor;
res=t+y;
cor = (t-res)+y;
if (res == (res + eps*cor))
{binexp.i[HIGH_HALF] = 0x00100000; return (res-1.0)*binexp.x;}
else return -10.0;
}
else {
binexp.i[HIGH_HALF] =(junk1.i[LOW_HALF]+767)<<20;
if (res == (res+cor*(1.0+error+err_1)))
return res*binexp.x*t256.x;
else return -10.0;
}
}

View file

@ -1,203 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*********************************************************************/
/* */
/* MODULE_NAME:ulog.c */
/* */
/* FUNCTION:ulog */
/* */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h ulog.h */
/* mpexp.c mplog.c mpa.c */
/* ulog.tbl */
/* */
/* An ultimate log routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of log(x). */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/*********************************************************************/
#include "endian.h"
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
#include "math_private.h"
void __mplog(mp_no *, mp_no *, int);
/*********************************************************************/
/* An ultimate log routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of log(x). */
/*********************************************************************/
double __ieee754_log(double x) {
#define M 4
static const int pr[M]={8,10,18,32};
int i,j,n,ux,dx,p;
#if 0
int k;
#endif
double dbl_n,u,p0,q,r0,w,nln2a,luai,lubi,lvaj,lvbj,
sij,ssij,ttij,A,B,B0,y,y1,y2,polI,polII,sa,sb,
t1,t2,t3,t4,t5,t6,t7,t8,t,ra,rb,ww,
a0,aa0,s1,s2,ss2,s3,ss3,a1,aa1,a,aa,b,bb,c;
number num;
mp_no mpx,mpy,mpy1,mpy2,mperr;
#include "ulog.tbl"
#include "ulog.h"
/* Treating special values of x ( x<=0, x=INF, x=NaN etc.). */
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
n=0;
if (ux < 0x00100000) {
if (((ux & 0x7fffffff) | dx) == 0) return MHALF/ZERO; /* return -INF */
if (ux < 0) return (x-x)/ZERO; /* return NaN */
n -= 54; x *= two54.d; /* scale x */
num.d = x;
}
if (ux >= 0x7ff00000) return x+x; /* INF or NaN */
/* Regular values of x */
w = x-ONE;
if (ABS(w) > U03) { goto case_03; }
/*--- Stage I, the case abs(x-1) < 0.03 */
t8 = MHALF*w;
EMULV(t8,w,a,aa,t1,t2,t3,t4,t5)
EADD(w,a,b,bb)
/* Evaluate polynomial II */
polII = (b0.d+w*(b1.d+w*(b2.d+w*(b3.d+w*(b4.d+
w*(b5.d+w*(b6.d+w*(b7.d+w*b8.d))))))))*w*w*w;
c = (aa+bb)+polII;
/* End stage I, case abs(x-1) < 0.03 */
if ((y=b+(c+b*E2)) == b+(c-b*E2)) return y;
/*--- Stage II, the case abs(x-1) < 0.03 */
a = d11.d+w*(d12.d+w*(d13.d+w*(d14.d+w*(d15.d+w*(d16.d+
w*(d17.d+w*(d18.d+w*(d19.d+w*d20.d))))))));
EMULV(w,a,s2,ss2,t1,t2,t3,t4,t5)
ADD2(d10.d,dd10.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d9.d,dd9.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d8.d,dd8.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d7.d,dd7.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d6.d,dd6.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d5.d,dd5.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d4.d,dd4.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d3.d,dd3.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(d2.d,dd2.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(w,ZERO,s2,ss2,s3,ss3,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(w,ZERO, s3,ss3, b, bb,t1,t2)
/* End stage II, case abs(x-1) < 0.03 */
if ((y=b+(bb+b*E4)) == b+(bb-b*E4)) return y;
goto stage_n;
/*--- Stage I, the case abs(x-1) > 0.03 */
case_03:
/* Find n,u such that x = u*2**n, 1/sqrt(2) < u < sqrt(2) */
n += (num.i[HIGH_HALF] >> 20) - 1023;
num.i[HIGH_HALF] = (num.i[HIGH_HALF] & 0x000fffff) | 0x3ff00000;
if (num.d > SQRT_2) { num.d *= HALF; n++; }
u = num.d; dbl_n = (double) n;
/* Find i such that ui=1+(i-75)/2**8 is closest to u (i= 0,1,2,...,181) */
num.d += h1.d;
i = (num.i[HIGH_HALF] & 0x000fffff) >> 12;
/* Find j such that vj=1+(j-180)/2**16 is closest to v=u/ui (j= 0,...,361) */
num.d = u*Iu[i].d + h2.d;
j = (num.i[HIGH_HALF] & 0x000fffff) >> 4;
/* Compute w=(u-ui*vj)/(ui*vj) */
p0=(ONE+(i-75)*DEL_U)*(ONE+(j-180)*DEL_V);
q=u-p0; r0=Iu[i].d*Iv[j].d; w=q*r0;
/* Evaluate polynomial I */
polI = w+(a2.d+a3.d*w)*w*w;
/* Add up everything */
nln2a = dbl_n*LN2A;
luai = Lu[i][0].d; lubi = Lu[i][1].d;
lvaj = Lv[j][0].d; lvbj = Lv[j][1].d;
EADD(luai,lvaj,sij,ssij)
EADD(nln2a,sij,A ,ttij)
B0 = (((lubi+lvbj)+ssij)+ttij)+dbl_n*LN2B;
B = polI+B0;
/* End stage I, case abs(x-1) >= 0.03 */
if ((y=A+(B+E1)) == A+(B-E1)) return y;
/*--- Stage II, the case abs(x-1) > 0.03 */
/* Improve the accuracy of r0 */
EMULV(p0,r0,sa,sb,t1,t2,t3,t4,t5)
t=r0*((ONE-sa)-sb);
EADD(r0,t,ra,rb)
/* Compute w */
MUL2(q,ZERO,ra,rb,w,ww,t1,t2,t3,t4,t5,t6,t7,t8)
EADD(A,B0,a0,aa0)
/* Evaluate polynomial III */
s1 = (c3.d+(c4.d+c5.d*w)*w)*w;
EADD(c2.d,s1,s2,ss2)
MUL2(s2,ss2,w,ww,s3,ss3,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(s3,ss3,w,ww,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(s2,ss2,w,ww,s3,ss3,t1,t2)
ADD2(s3,ss3,a0,aa0,a1,aa1,t1,t2)
/* End stage II, case abs(x-1) >= 0.03 */
if ((y=a1+(aa1+E3)) == a1+(aa1-E3)) return y;
/* Final stages. Use multi-precision arithmetic. */
stage_n:
for (i=0; i<M; i++) {
p = pr[i];
__dbl_mp(x,&mpx,p); __dbl_mp(y,&mpy,p);
__mplog(&mpx,&mpy,p);
__dbl_mp(e[i].d,&mperr,p);
__add(&mpy,&mperr,&mpy1,p); __sub(&mpy,&mperr,&mpy2,p);
__mp_dbl(&mpy1,&y1,p); __mp_dbl(&mpy2,&y2,p);
if (y1==y2) return y1;
}
return y1;
}

View file

@ -1,97 +0,0 @@
/* @(#)e_log10.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $";
#endif
/* __ieee754_log10(x)
* Return the base 10 logarithm of x
*
* Method :
* Let log10_2hi = leading 40 bits of log10(2) and
* log10_2lo = log10(2) - log10_2hi,
* ivln10 = 1/log(10) rounded.
* Then
* n = ilogb(x),
* if(n<0) n = n+1;
* x = scalbn(x,-n);
* log10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
*
* Note 1:
* To guarantee log10(10**n)=n, where 10**n is normal, the rounding
* mode must set to Round-to-Nearest.
* Note 2:
* [1/log(10)] rounded to 53 bits has error .198 ulps;
* log10 is monotonic at all binary break points.
*
* Special cases:
* log10(x) is NaN with signal if x < 0;
* log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
* log10(NaN) is that NaN with no signal;
* log10(10**N) = N for N=0,1,...,22.
*
* Constants:
* The hexadecimal values are the intended ones for the following constants.
* The decimal values may be used, provided that the compiler will convert
* from decimal to binary accurately enough to produce the hexadecimal values
* shown.
*/
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
#ifdef __STDC__
static const double zero = 0.0;
#else
static double zero = 0.0;
#endif
#ifdef __STDC__
double __ieee754_log10(double x)
#else
double __ieee754_log10(x)
double x;
#endif
{
double y,z;
int32_t i,k,hx;
uint32_t lx;
EXTRACT_WORDS(hx,lx,x);
k=0;
if (hx < 0x00100000) { /* x < 2**-1022 */
if (((hx&0x7fffffff)|lx)==0)
return -two54/(x-x); /* log(+-0)=-inf */
if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
k -= 54; x *= two54; /* subnormal number, scale up x */
GET_HIGH_WORD(hx,x);
}
if (hx >= 0x7ff00000) return x+x;
k += (hx>>20)-1023;
i = ((uint32_t)k&0x80000000)>>31;
hx = (hx&0x000fffff)|((0x3ff-i)<<20);
y = (double)(k+i);
SET_HIGH_WORD(x,hx);
z = y*log10_2lo + ivln10*__ieee754_log(x);
return z+y*log10_2hi;
}

View file

@ -1,388 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001, 2002, 2004 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/***************************************************************************/
/* MODULE_NAME: upow.c */
/* */
/* FUNCTIONS: upow */
/* power1 */
/* my_log2 */
/* log1 */
/* checkint */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h */
/* halfulp.c mpexp.c mplog.c slowexp.c slowpow.c mpa.c */
/* uexp.c upow.c */
/* root.tbl uexp.tbl upow.tbl */
/* An ultimate power routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of x^y. */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/***************************************************************************/
#include "endian.h"
#include "upow.h"
#include "dla.h"
#include "mydefs.h"
#include "MathLib.h"
#include "upow.tbl"
#include "math_private.h"
double __exp1(double x, double xx, double error);
static double log1(double x, double *delta, double *error);
static double my_log2(double x, double *delta, double *error);
double __slowpow(double x, double y,double z);
static double power1(double x, double y);
static int checkint(double x);
/***************************************************************************/
/* An ultimate power routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of X^y. */
/***************************************************************************/
double __ieee754_pow(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2;
#if 0
double gor=1.0;
#endif
mynumber u,v;
int k;
int4 qx,qy;
v.x=y;
u.x=x;
if (v.i[LOW_HALF] == 0) { /* of y */
qx = u.i[HIGH_HALF]&0x7fffffff;
/* Checking if x is not too small to compute */
if (((qx==0x7ff00000)&&(u.i[LOW_HALF]!=0))||(qx>0x7ff00000)) return NaNQ.x;
if (y == 1.0) return x;
if (y == 2.0) return x*x;
if (y == -1.0) return 1.0/x;
if (y == 0) return 1.0;
}
/* else */
if(((u.i[HIGH_HALF]>0 && u.i[HIGH_HALF]<0x7ff00000)|| /* x>0 and not x->0 */
(u.i[HIGH_HALF]==0 && u.i[LOW_HALF]!=0)) &&
/* 2^-1023< x<= 2^-1023 * 0x1.0000ffffffff */
(v.i[HIGH_HALF]&0x7fffffff) < 0x4ff00000) { /* if y<-1 or y>1 */
z = log1(x,&aa,&error); /* x^y =e^(y log (X)) */
t = y*134217729.0;
y1 = t - (t-y);
y2 = y - y1;
t = z*134217729.0;
a1 = t - (t-z);
a2 = (z - a1)+aa;
a = y1*a1;
aa = y2*a1 + y*a2;
a1 = a+aa;
a2 = (a-a1)+aa;
error = error*ABS(y);
t = __exp1(a1,a2,1.9e16*error); /* return -10 or 0 if wasn't computed exactly */
return (t>0)?t:power1(x,y);
}
if (x == 0) {
if (((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] != 0)
|| (v.i[HIGH_HALF] & 0x7fffffff) > 0x7ff00000)
return y;
if (ABS(y) > 1.0e20) return (y>0)?0:INF.x;
k = checkint(y);
if (k == -1)
return y < 0 ? 1.0/x : x;
else
return y < 0 ? 1.0/ABS(x) : 0.0; /* return 0 */
}
/* if x<0 */
if (u.i[HIGH_HALF] < 0) {
k = checkint(y);
if (k==0) {
if ((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] == 0) {
if (x == -1.0) return 1.0;
else if (x > -1.0) return v.i[HIGH_HALF] < 0 ? INF.x : 0.0;
else return v.i[HIGH_HALF] < 0 ? 0.0 : INF.x;
}
else if (u.i[HIGH_HALF] == 0xfff00000 && u.i[LOW_HALF] == 0)
return y < 0 ? 0.0 : INF.x;
return NaNQ.x; /* y not integer and x<0 */
}
else if (u.i[HIGH_HALF] == 0xfff00000 && u.i[LOW_HALF] == 0)
{
if (k < 0)
return y < 0 ? nZERO.x : nINF.x;
else
return y < 0 ? 0.0 : INF.x;
}
return (k==1)?__ieee754_pow(-x,y):-__ieee754_pow(-x,y); /* if y even or odd */
}
/* x>0 */
qx = u.i[HIGH_HALF]&0x7fffffff; /* no sign */
qy = v.i[HIGH_HALF]&0x7fffffff; /* no sign */
if (qx > 0x7ff00000 || (qx == 0x7ff00000 && u.i[LOW_HALF] != 0)) return NaNQ.x;
/* if 0<x<2^-0x7fe */
if (qy > 0x7ff00000 || (qy == 0x7ff00000 && v.i[LOW_HALF] != 0))
return x == 1.0 ? 1.0 : NaNQ.x;
/* if y<2^-0x7fe */
if (qx == 0x7ff00000) /* x= 2^-0x3ff */
{if (y == 0) return NaNQ.x;
return (y>0)?x:0; }
if (qy > 0x45f00000 && qy < 0x7ff00000) {
if (x == 1.0) return 1.0;
if (y>0) return (x>1.0)?INF.x:0;
if (y<0) return (x<1.0)?INF.x:0;
}
if (x == 1.0) return 1.0;
if (y>0) return (x>1.0)?INF.x:0;
if (y<0) return (x<1.0)?INF.x:0;
return 0; /* unreachable, to make the compiler happy */
}
/**************************************************************************/
/* Computing x^y using more accurate but more slow log routine */
/**************************************************************************/
static double power1(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2;
z = my_log2(x,&aa,&error);
t = y*134217729.0;
y1 = t - (t-y);
y2 = y - y1;
t = z*134217729.0;
a1 = t - (t-z);
a2 = z - a1;
a = y*z;
aa = ((y1*a1-a)+y1*a2+y2*a1)+y2*a2+aa*y;
a1 = a+aa;
a2 = (a-a1)+aa;
error = error*ABS(y);
t = __exp1(a1,a2,1.9e16*error);
return (t >= 0)?t:__slowpow(x,y,z);
}
/****************************************************************************/
/* Computing log(x) (x is left argument). The result is the returned double */
/* + the parameter delta. */
/* The result is bounded by error (rightmost argument) */
/****************************************************************************/
static double log1(double x, double *delta, double *error) {
int i,j,m;
#if 0
int n;
#endif
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0;
#if 0
double cor;
#endif
mynumber u,v;
#ifdef BIG_ENDI
mynumber
/**/ two52 = {{0x43300000, 0x00000000}}; /* 2**52 */
#else
#ifdef LITTLE_ENDI
mynumber
/**/ two52 = {{0x00000000, 0x43300000}}; /* 2**52 */
#endif
#endif
u.x = x;
m = u.i[HIGH_HALF];
*error = 0;
*delta = 0;
if (m < 0x00100000) /* 1<x<2^-1007 */
{ x = x*t52.x; add = -52.0; u.x = x; m = u.i[HIGH_HALF];}
if ((m&0x000fffff) < 0x0006a09e)
{u.i[HIGH_HALF] = (m&0x000fffff)|0x3ff00000; two52.i[LOW_HALF]=(m>>20); }
else
{u.i[HIGH_HALF] = (m&0x000fffff)|0x3fe00000; two52.i[LOW_HALF]=(m>>20)+1; }
v.x = u.x + bigu.x;
uu = v.x - bigu.x;
i = (v.i[LOW_HALF]&0x000003ff)<<2;
if (two52.i[LOW_HALF] == 1023) /* nx = 0 */
{
if (i > 1192 && i < 1208) /* |x-1| < 1.5*2**-10 */
{
t = x - 1.0;
t1 = (t+5.0e6)-5.0e6;
t2 = t-t1;
e1 = t - 0.5*t1*t1;
e2 = t*t*t*(r3+t*(r4+t*(r5+t*(r6+t*(r7+t*r8)))))-0.5*t2*(t+t1);
res = e1+e2;
*error = 1.0e-21*ABS(t);
*delta = (e1-res)+e2;
return res;
} /* |x-1| < 1.5*2**-10 */
else
{
v.x = u.x*(ui.x[i]+ui.x[i+1])+bigv.x;
vv = v.x-bigv.x;
j = v.i[LOW_HALF]&0x0007ffff;
j = j+j+j;
eps = u.x - uu*vv;
e1 = eps*ui.x[i];
e2 = eps*(ui.x[i+1]+vj.x[j]*(ui.x[i]+ui.x[i+1]));
e = e1+e2;
e2 = ((e1-e)+e2);
t=ui.x[i+2]+vj.x[j+1];
t1 = t+e;
t2 = (((t-t1)+e)+(ui.x[i+3]+vj.x[j+2]))+e2+e*e*(p2+e*(p3+e*p4));
res=t1+t2;
*error = 1.0e-24;
*delta = (t1-res)+t2;
return res;
}
} /* nx = 0 */
else /* nx != 0 */
{
eps = u.x - uu;
nx = (two52.x - two52e.x)+add;
e1 = eps*ui.x[i];
e2 = eps*ui.x[i+1];
e=e1+e2;
e2 = (e1-e)+e2;
t=nx*ln2a.x+ui.x[i+2];
t1=t+e;
t2=(((t-t1)+e)+nx*ln2b.x+ui.x[i+3]+e2)+e*e*(q2+e*(q3+e*(q4+e*(q5+e*q6))));
res = t1+t2;
*error = 1.0e-21;
*delta = (t1-res)+t2;
return res;
} /* nx != 0 */
}
/****************************************************************************/
/* More slow but more accurate routine of log */
/* Computing log(x)(x is left argument).The result is return double + delta.*/
/* The result is bounded by error (right argument) */
/****************************************************************************/
static double my_log2(double x, double *delta, double *error) {
int i,j,m;
#if 0
int n;
#endif
double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0;
#if 0
double cor;
#endif
double ou1,ou2,lu1,lu2,ov,lv1,lv2,a,a1,a2;
double y,yy,z,zz,j1,j2,j3,j4,j5,j6,j7,j8;
mynumber u,v;
#ifdef BIG_ENDI
mynumber
/**/ two52 = {{0x43300000, 0x00000000}}; /* 2**52 */
#else
#ifdef LITTLE_ENDI
mynumber
/**/ two52 = {{0x00000000, 0x43300000}}; /* 2**52 */
#endif
#endif
u.x = x;
m = u.i[HIGH_HALF];
*error = 0;
*delta = 0;
add=0;
if (m<0x00100000) { /* x < 2^-1022 */
x = x*t52.x; add = -52.0; u.x = x; m = u.i[HIGH_HALF]; }
if ((m&0x000fffff) < 0x0006a09e)
{u.i[HIGH_HALF] = (m&0x000fffff)|0x3ff00000; two52.i[LOW_HALF]=(m>>20); }
else
{u.i[HIGH_HALF] = (m&0x000fffff)|0x3fe00000; two52.i[LOW_HALF]=(m>>20)+1; }
v.x = u.x + bigu.x;
uu = v.x - bigu.x;
i = (v.i[LOW_HALF]&0x000003ff)<<2;
/*------------------------------------- |x-1| < 2**-11------------------------------- */
if ((two52.i[LOW_HALF] == 1023) && (i == 1200))
{
t = x - 1.0;
EMULV(t,s3,y,yy,j1,j2,j3,j4,j5);
ADD2(-0.5,0,y,yy,z,zz,j1,j2);
MUL2(t,0,z,zz,y,yy,j1,j2,j3,j4,j5,j6,j7,j8);
MUL2(t,0,y,yy,z,zz,j1,j2,j3,j4,j5,j6,j7,j8);
e1 = t+z;
e2 = (((t-e1)+z)+zz)+t*t*t*(ss3+t*(s4+t*(s5+t*(s6+t*(s7+t*s8)))));
res = e1+e2;
*error = 1.0e-25*ABS(t);
*delta = (e1-res)+e2;
return res;
}
/*----------------------------- |x-1| > 2**-11 -------------------------- */
else
{ /*Computing log(x) according to log table */
nx = (two52.x - two52e.x)+add;
ou1 = ui.x[i];
ou2 = ui.x[i+1];
lu1 = ui.x[i+2];
lu2 = ui.x[i+3];
v.x = u.x*(ou1+ou2)+bigv.x;
vv = v.x-bigv.x;
j = v.i[LOW_HALF]&0x0007ffff;
j = j+j+j;
eps = u.x - uu*vv;
ov = vj.x[j];
lv1 = vj.x[j+1];
lv2 = vj.x[j+2];
a = (ou1+ou2)*(1.0+ov);
a1 = (a+1.0e10)-1.0e10;
a2 = a*(1.0-a1*uu*vv);
e1 = eps*a1;
e2 = eps*a2;
e = e1+e2;
e2 = (e1-e)+e2;
t=nx*ln2a.x+lu1+lv1;
t1 = t+e;
t2 = (((t-t1)+e)+(lu2+lv2+nx*ln2b.x+e2))+e*e*(p2+e*(p3+e*p4));
res=t1+t2;
*error = 1.0e-27;
*delta = (t1-res)+t2;
return res;
}
}
/**********************************************************************/
/* Routine receives a double x and checks if it is an integer. If not */
/* it returns 0, else it returns 1 if even or -1 if odd. */
/**********************************************************************/
static int checkint(double x) {
union {int4 i[2]; double x;} u;
int k,m,n;
#if 0
int l;
#endif
u.x = x;
m = u.i[HIGH_HALF]&0x7fffffff; /* no sign */
if (m >= 0x7ff00000) return 0; /* x is +/-inf or NaN */
if (m >= 0x43400000) return 1; /* |x| >= 2**53 */
if (m < 0x40000000) return 0; /* |x| < 2, can not be 0 or 1 */
n = u.i[LOW_HALF];
k = (m>>20)-1023; /* 1 <= k <= 52 */
if (k == 52) return (n&1)? -1:1; /* odd or even*/
if (k>20) {
if (n<<(k-20)) return 0; /* if not integer */
return (n<<(k-21))?-1:1;
}
if (n) return 0; /*if not integer*/
if (k == 20) return (m&1)? -1:1;
if (m<<(k+12)) return 0;
return (m<<(k+11))?-1:1;
}

View file

@ -1,182 +0,0 @@
/* @(#)e_rem_pio2.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $";
#endif
/* __ieee754_rem_pio2(x,y)
*
* return the remainder of x rem pi/2 in y[0]+y[1]
* use __kernel_rem_pio2()
*/
#include "math_private.h"
/*
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
*/
#ifdef __STDC__
static const int32_t two_over_pi[] = {
#else
static int32_t two_over_pi[] = {
#endif
0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
};
#ifdef __STDC__
static const int32_t npio2_hw[] = {
#else
static int32_t npio2_hw[] = {
#endif
0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,
0x404858EB, 0x404921FB,
};
/*
* invpio2: 53 bits of 2/pi
* pio2_1: first 33 bit of pi/2
* pio2_1t: pi/2 - pio2_1
* pio2_2: second 33 bit of pi/2
* pio2_2t: pi/2 - (pio2_1+pio2_2)
* pio2_3: third 33 bit of pi/2
* pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
*/
#ifdef __STDC__
static const double
#else
static double
#endif
zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
#ifdef __STDC__
int32_t __ieee754_rem_pio2(double x, double *y)
#else
int32_t __ieee754_rem_pio2(x,y)
double x,y[];
#endif
{
double z=z,w,t,r,fn;
double tx[3];
int32_t e0,i,j,nx,n,ix,hx;
uint32_t low;
GET_HIGH_WORD(hx,x); /* high word of x */
ix = hx&0x7fffffff;
if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */
{y[0] = x; y[1] = 0; return 0;}
if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */
if(hx>0) {
z = x - pio2_1;
if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
y[0] = z - pio2_1t;
y[1] = (z-y[0])-pio2_1t;
} else { /* near pi/2, use 33+33+53 bit pi */
z -= pio2_2;
y[0] = z - pio2_2t;
y[1] = (z-y[0])-pio2_2t;
}
return 1;
} else { /* negative x */
z = x + pio2_1;
if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
y[0] = z + pio2_1t;
y[1] = (z-y[0])+pio2_1t;
} else { /* near pi/2, use 33+33+53 bit pi */
z += pio2_2;
y[0] = z + pio2_2t;
y[1] = (z-y[0])+pio2_2t;
}
return -1;
}
}
if(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */
t = fabs(x);
n = (int32_t) (t*invpio2+half);
fn = (double)n;
r = t-fn*pio2_1;
w = fn*pio2_1t; /* 1st round good to 85 bit */
if(n<32&&ix!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */
} else {
uint32_t high;
j = ix>>20;
y[0] = r-w;
GET_HIGH_WORD(high,y[0]);
i = j-((high>>20)&0x7ff);
if(i>16) { /* 2nd iteration needed, good to 118 */
t = r;
w = fn*pio2_2;
r = t-w;
w = fn*pio2_2t-((t-r)-w);
y[0] = r-w;
GET_HIGH_WORD(high,y[0]);
i = j-((high>>20)&0x7ff);
if(i>49) { /* 3rd iteration need, 151 bits acc */
t = r; /* will cover all possible cases */
w = fn*pio2_3;
r = t-w;
w = fn*pio2_3t-((t-r)-w);
y[0] = r-w;
}
}
}
y[1] = (r-y[0])-w;
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
else return n;
}
/*
* all other (large) arguments
*/
if(ix>=0x7ff00000) { /* x is inf or NaN */
y[0]=y[1]=x-x; return 0;
}
/* set z = scalbn(|x|,ilogb(x)-23) */
GET_LOW_WORD(low,x);
SET_LOW_WORD(z,low);
e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
for(i=0;i<2;i++) {
tx[i] = (double)((int32_t)(z));
z = (z-tx[i])*two24;
}
tx[2] = z;
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
return n;
}

View file

@ -1,88 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*********************************************************************/
/* MODULE_NAME: uroot.c */
/* */
/* FUNCTION: usqrt */
/* */
/* FILES NEEDED: dla.h endian.h mydefs.h uroot.h */
/* uroot.tbl */
/* */
/* An ultimate sqrt routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of square */
/* root of x. */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/*********************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "dla.h"
#include "MathLib.h"
#include "root.tbl"
#include "math_private.h"
/*********************************************************************/
/* An ultimate sqrt routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of square */
/* root of x. */
/*********************************************************************/
double __ieee754_sqrt(double x) {
#include "uroot.h"
static const double
rt0 = 9.99999999859990725855365213134618E-01,
rt1 = 4.99999999495955425917856814202739E-01,
rt2 = 3.75017500867345182581453026130850E-01,
rt3 = 3.12523626554518656309172508769531E-01;
static const double big = 134217728.0;
double y,t,del,res,res1,hy,z,zz,p,hx,tx,ty,s;
mynumber a,c={{0,0}};
int4 k;
a.x=x;
k=a.i[HIGH_HALF];
a.i[HIGH_HALF]=(k&0x001fffff)|0x3fe00000;
t=inroot[(k&0x001fffff)>>14];
s=a.x;
/*----------------- 2^-1022 <= | x |< 2^1024 -----------------*/
if (k>0x000fffff && k<0x7ff00000) {
y=1.0-t*(t*s);
t=t*(rt0+y*(rt1+y*(rt2+y*rt3)));
c.i[HIGH_HALF]=0x20000000+((k&0x7fe00000)>>1);
y=t*s;
hy=(y+big)-big;
del=0.5*t*((s-hy*hy)-(y-hy)*(y+hy));
res=y+del;
if (res == (res+1.002*((y-res)+del))) return res*c.x;
else {
res1=res+1.5*((y-res)+del);
EMULV(res,res1,z,zz,p,hx,tx,hy,ty); /* (z+zz)=res*res1 */
return ((((z-s)+zz)<0)?max(res,res1):min(res,res1))*c.x;
}
}
else {
if ((k & 0x7ff00000) == 0x7ff00000)
return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf, sqrt(-inf)=sNaN */
if (x==0) return x; /* sqrt(+0)=+0, sqrt(-0)=-0 */
if (k<0) return (x-x)/(x-x); /* sqrt(-ve)=sNaN */
return tm256.x*__ieee754_sqrt(x*t512.x);
}
}

View file

@ -1,123 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001, 2005 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* */
/* MODULE_NAME:halfulp.c */
/* */
/* FUNCTIONS:halfulp */
/* FILES NEEDED: mydefs.h dla.h endian.h */
/* uroot.c */
/* */
/*Routine halfulp(double x, double y) computes x^y where result does */
/*not need rounding. If the result is closer to 0 than can be */
/*represented it returns 0. */
/* In the following cases the function does not compute anything */
/*and returns a negative number: */
/*1. if the result needs rounding, */
/*2. if y is outside the interval [0, 2^20-1], */
/*3. if x can be represented by x=2**n for some integer n. */
/************************************************************************/
#include "endian.h"
#include "mydefs.h"
#include "dla.h"
#include "math_private.h"
double __ieee754_sqrt(double x);
static const int4 tab54[32] = {
262143, 11585, 1782, 511, 210, 107, 63, 42,
30, 22, 17, 14, 12, 10, 9, 7,
7, 6, 5, 5, 5, 4, 4, 4,
3, 3, 3, 3, 3, 3, 3, 3 };
double __halfulp(double x, double y)
{
mynumber v;
double z,u,uu,j1,j2,j3,j4,j5;
int4 k,l,m,n;
if (y <= 0) { /*if power is negative or zero */
v.x = y;
if (v.i[LOW_HALF] != 0) return -10.0;
v.x = x;
if (v.i[LOW_HALF] != 0) return -10.0;
if ((v.i[HIGH_HALF]&0x000fffff) != 0) return -10; /* if x =2 ^ n */
k = ((v.i[HIGH_HALF]&0x7fffffff)>>20)-1023; /* find this n */
z = (double) k;
return (z*y == -1075.0)?0: -10.0;
}
/* if y > 0 */
v.x = y;
if (v.i[LOW_HALF] != 0) return -10.0;
v.x=x;
/* case where x = 2**n for some integer n */
if (((v.i[HIGH_HALF]&0x000fffff)|v.i[LOW_HALF]) == 0) {
k=(v.i[HIGH_HALF]>>20)-1023;
return (((double) k)*y == -1075.0)?0:-10.0;
}
v.x = y;
k = v.i[HIGH_HALF];
m = k<<12;
l = 0;
while (m)
{m = m<<1; l++; }
n = (k&0x000fffff)|0x00100000;
n = n>>(20-l); /* n is the odd integer of y */
k = ((k>>20) -1023)-l; /* y = n*2**k */
if (k>5) return -10.0;
if (k>0) for (;k>0;k--) n *= 2;
if (n > 34) return -10.0;
k = -k;
if (k>5) return -10.0;
/* now treat x */
while (k>0) {
z = __ieee754_sqrt(x);
EMULV(z,z,u,uu,j1,j2,j3,j4,j5);
if (((u-x)+uu) != 0) break;
x = z;
k--;
}
if (k) return -10.0;
/* it is impossible that n == 2, so the mantissa of x must be short */
v.x = x;
if (v.i[LOW_HALF]) return -10.0;
k = v.i[HIGH_HALF];
m = k<<12;
l = 0;
while (m) {m = m<<1; l++; }
m = (k&0x000fffff)|0x00100000;
m = m>>(20-l); /* m is the odd integer of x */
/* now check whether the length of m**n is at most 54 bits */
if (m > tab54[n-3]) return -10.0;
/* yes, it is - now compute x**n by simple multiplications */
u = x;
for (k=1;k<n;k++) u = u*x;
return u;
}

View file

@ -1,319 +0,0 @@
/* @(#)k_rem_pio2.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $";
#endif
/*
* __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
* double x[],y[]; int e0,nx,prec; int ipio2[];
*
* __kernel_rem_pio2 return the last three digits of N with
* y = x - N*pi/2
* so that |y| < pi/2.
*
* The method is to compute the integer (mod 8) and fraction parts of
* (2/pi)*x without doing the full multiplication. In general we
* skip the part of the product that are known to be a huge integer (
* more accurately, = 0 mod 8 ). Thus the number of operations are
* independent of the exponent of the input.
*
* (2/pi) is represented by an array of 24-bit integers in ipio2[].
*
* Input parameters:
* x[] The input value (must be positive) is broken into nx
* pieces of 24-bit integers in double precision format.
* x[i] will be the i-th 24 bit of x. The scaled exponent
* of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
* match x's up to 24 bits.
*
* Example of breaking a double positive z into x[0]+x[1]+x[2]:
* e0 = ilogb(z)-23
* z = scalbn(z,-e0)
* for i = 0,1,2
* x[i] = floor(z)
* z = (z-x[i])*2**24
*
*
* y[] ouput result in an array of double precision numbers.
* The dimension of y[] is:
* 24-bit precision 1
* 53-bit precision 2
* 64-bit precision 2
* 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit
* precision, one may have to do something like:
*
* long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1];
* w = (long double)y[0];
* r_head = t+w;
* r_tail = w - (r_head - t);
*
* e0 The exponent of x[0]
*
* nx dimension of x[]
*
* prec an integer indicating the precision:
* 0 24 bits (single)
* 1 53 bits (double)
* 2 64 bits (extended)
* 3 113 bits (quad)
*
* ipio2[]
* integer array, contains the (24*i)-th to (24*i+23)-th
* bit of 2/pi after binary point. The corresponding
* floating value is
*
* ipio2[i] * 2^(-24(i+1)).
*
* External function:
* double scalbn(), floor();
*
*
* Here is the description of some local variables:
*
* jk jk+1 is the initial number of terms of ipio2[] needed
* in the computation. The recommended value is 2,3,4,
* 6 for single, double, extended,and quad.
*
* jz local integer variable indicating the number of
* terms of ipio2[] used.
*
* jx nx - 1
*
* jv index for pointing to the suitable ipio2[] for the
* computation. In general, we want
* ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8
* is an integer. Thus
* e0-3-24*jv >= 0 or (e0-3)/24 >= jv
* Hence jv = max(0,(e0-3)/24).
*
* jp jp+1 is the number of terms in PIo2[] needed, jp = jk.
*
* q[] double array with integral value, representing the
* 24-bits chunk of the product of x and 2/pi.
*
* q0 the corresponding exponent of q[0]. Note that the
* exponent for q[i] would be q0-24*i.
*
* PIo2[] double precision array, obtained by cutting pi/2
* into 24 bits chunks.
*
* f[] ipio2[] in floating point
*
* iq[] integer array by breaking up q[] in 24-bits chunk.
*
* fq[] final product of x*(2/pi) in fq[0],..,fq[jk]
*
* ih integer. If >0 it indicates q[] is >= 0.5, hence
* it also indicates the *sign* of the result.
*
*/
/*
* Constants:
* The hexadecimal values are the intended ones for the following
* constants. The decimal values may be used, provided that the
* compiler will convert from decimal to binary accurately enough
* to produce the hexadecimal values shown.
*/
#include "math_private.h"
#ifdef __STDC__
static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
#else
static int init_jk[] = {2,3,4,6};
#endif
#ifdef __STDC__
static const double PIo2[] = {
#else
static double PIo2[] = {
#endif
1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */
1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */
1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */
2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */
2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
};
#ifdef __STDC__
static const double
#else
static double
#endif
zero = 0.0,
one = 1.0,
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
#ifdef __STDC__
int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
#else
int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
double x[], y[]; int e0,nx,prec; int32_t ipio2[];
#endif
{
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
double z,fw,f[20],fq[20],q[20];
/* initialize jk*/
jk = init_jk[prec];
jp = jk;
/* determine jx,jv,q0, note that 3>q0 */
jx = nx-1;
jv = (e0-3)/24; if(jv<0) jv=0;
q0 = e0-24*(jv+1);
/* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
j = jv-jx; m = jx+jk;
for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];
/* compute q[0],q[1],...q[jk] */
for (i=0;i<=jk;i++) {
for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
}
jz = jk;
recompute:
/* distill q[] into iq[] reversingly */
for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
fw = (double)((int32_t)(twon24* z));
iq[i] = (int32_t)(z-two24*fw);
z = q[j-1]+fw;
}
/* compute n */
z = __scalbn(z,q0); /* actual value of z */
z -= 8.0*__floor(z*0.125); /* trim off integer >= 8 */
n = (int32_t) z;
z -= (double)n;
ih = 0;
if(q0>0) { /* need iq[jz-1] to determine n */
i = (iq[jz-1]>>(24-q0)); n += i;
iq[jz-1] -= i<<(24-q0);
ih = iq[jz-1]>>(23-q0);
}
else if(q0==0) ih = iq[jz-1]>>23;
else if(z>=0.5) ih=2;
if(ih>0) { /* q > 0.5 */
n += 1; carry = 0;
for(i=0;i<jz ;i++) { /* compute 1-q */
j = iq[i];
if(carry==0) {
if(j!=0) {
carry = 1; iq[i] = 0x1000000- j;
}
} else iq[i] = 0xffffff - j;
}
if(q0>0) { /* rare case: chance is 1 in 12 */
switch(q0) {
case 1:
iq[jz-1] &= 0x7fffff; break;
case 2:
iq[jz-1] &= 0x3fffff; break;
}
}
if(ih==2) {
z = one - z;
if(carry!=0) z -= __scalbn(one,q0);
}
}
/* check if recomputation is needed */
if(z==zero) {
j = 0;
for (i=jz-1;i>=jk;i--) j |= iq[i];
if(j==0) { /* need recomputation */
for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
f[jx+i] = (double) ipio2[jv+i];
for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
q[i] = fw;
}
jz += k;
goto recompute;
}
}
/* chop off zero terms */
if(z==0.0) {
jz -= 1; q0 -= 24;
while(iq[jz]==0) { jz--; q0-=24;}
} else { /* break z into 24-bit if necessary */
z = __scalbn(z,-q0);
if(z>=two24) {
fw = (double)((int32_t)(twon24*z));
iq[jz] = (int32_t)(z-two24*fw);
jz += 1; q0 += 24;
iq[jz] = (int32_t) fw;
} else iq[jz] = (int32_t) z ;
}
/* convert integer "bit" chunk to floating-point value */
fw = __scalbn(one,q0);
for(i=jz;i>=0;i--) {
q[i] = fw*(double)iq[i]; fw*=twon24;
}
/* compute PIo2[0,...,jp]*q[jz,...,0] */
for(i=jz;i>=0;i--) {
for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
fq[jz-i] = fw;
}
/* compress fq[] into y[] */
switch(prec) {
case 0:
fw = 0.0;
for (i=jz;i>=0;i--) fw += fq[i];
y[0] = (ih==0)? fw: -fw;
break;
case 1:
case 2:
fw = 0.0;
for (i=jz;i>=0;i--) fw += fq[i];
y[0] = (ih==0)? fw: -fw;
fw = fq[0]-fw;
for (i=1;i<=jz;i++) fw += fq[i];
y[1] = (ih==0)? fw: -fw;
break;
case 3: /* painful */
for (i=jz;i>0;i--) {
fw = fq[i-1]+fq[i];
fq[i] += fq[i-1]-fw;
fq[i-1] = fw;
}
for (i=jz;i>1;i--) {
fw = fq[i-1]+fq[i];
fq[i] += fq[i-1]-fw;
fq[i-1] = fw;
}
for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
if(ih==0) {
y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
} else {
y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
}
}
return n&7;
}

View file

@ -1,508 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: mpa.c */
/* */
/* FUNCTIONS: */
/* mcr */
/* acr */
/* cr */
/* cpy */
/* cpymn */
/* norm */
/* denorm */
/* mp_dbl */
/* dbl_mp */
/* add_magnitudes */
/* sub_magnitudes */
/* add */
/* sub */
/* mul */
/* inv */
/* dvd */
/* */
/* Arithmetic functions for multiple precision numbers. */
/* Relative errors are bounded */
/************************************************************************/
#include "endian.h"
#include "mpa.h"
#include "mpa2.h"
/* mcr() compares the sizes of the mantissas of two multiple precision */
/* numbers. Mantissas are compared regardless of the signs of the */
/* numbers, even if x->d[0] or y->d[0] are zero. Exponents are also */
/* disregarded. */
static int mcr(const mp_no *x, const mp_no *y, int p) {
int i;
for (i=1; i<=p; i++) {
if (X[i] == Y[i]) continue;
else if (X[i] > Y[i]) return 1;
else return -1; }
return 0;
}
/* acr() compares the absolute values of two multiple precision numbers */
int __acr(const mp_no *x, const mp_no *y, int p) {
int i;
if (X[0] == ZERO) {
if (Y[0] == ZERO) i= 0;
else i=-1;
}
else if (Y[0] == ZERO) i= 1;
else {
if (EX > EY) i= 1;
else if (EX < EY) i=-1;
else i= mcr(x,y,p);
}
return i;
}
/* cr90 compares the values of two multiple precision numbers */
int __cr(const mp_no *x, const mp_no *y, int p) {
int i;
if (X[0] > Y[0]) i= 1;
else if (X[0] < Y[0]) i=-1;
else if (X[0] < ZERO ) i= __acr(y,x,p);
else i= __acr(x,y,p);
return i;
}
/* Copy a multiple precision number. Set *y=*x. x=y is permissible. */
void __cpy(const mp_no *x, mp_no *y, int p) {
int i;
EY = EX;
for (i=0; i <= p; i++) Y[i] = X[i];
return;
}
/* Copy a multiple precision number x of precision m into a */
/* multiple precision number y of precision n. In case n>m, */
/* the digits of y beyond the m'th are set to zero. In case */
/* n<m, the digits of x beyond the n'th are ignored. */
/* x=y is permissible. */
void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
int i,k;
EY = EX; k=MIN(m,n);
for (i=0; i <= k; i++) Y[i] = X[i];
for ( ; i <= n; i++) Y[i] = ZERO;
return;
}
/* Convert a multiple precision number *x into a double precision */
/* number *y, normalized case (|x| >= 2**(-1022))) */
static void norm(const mp_no *x, double *y, int p)
{
#define R radixi.d
int i;
#if 0
int k;
#endif
double a,c=c,u,v,z[5];
if (p<5) {
if (p==1) c = X[1];
else if (p==2) c = X[1] + R* X[2];
else if (p==3) c = X[1] + R*(X[2] + R* X[3]);
else if (p==4) c =(X[1] + R* X[2]) + R*R*(X[3] + R*X[4]);
}
else {
for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
{a *= TWO; z[1] *= TWO; }
for (i=2; i<5; i++) {
z[i] = X[i]*a;
u = (z[i] + CUTTER)-CUTTER;
if (u > z[i]) u -= RADIX;
z[i] -= u;
z[i-1] += u*RADIXI;
}
u = (z[3] + TWO71) - TWO71;
if (u > z[3]) u -= TWO19;
v = z[3]-u;
if (v == TWO18) {
if (z[4] == ZERO) {
for (i=5; i <= p; i++) {
if (X[i] == ZERO) continue;
else {z[3] += ONE; break; }
}
}
else z[3] += ONE;
}
c = (z[1] + R *(z[2] + R * z[3]))/a;
}
c *= X[0];
for (i=1; i<EX; i++) c *= RADIX;
for (i=1; i>EX; i--) c *= RADIXI;
*y = c;
return;
#undef R
}
/* Convert a multiple precision number *x into a double precision */
/* number *y, denormalized case (|x| < 2**(-1022))) */
static void denorm(const mp_no *x, double *y, int p)
{
int i,k;
double c,u,z[5];
#if 0
double a,v;
#endif
#define R radixi.d
if (EX<-44 || (EX==-44 && X[1]<TWO5))
{ *y=ZERO; return; }
if (p==1) {
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=ZERO; z[3]=ZERO; k=3;}
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; z[3]=ZERO; k=2;}
else {z[1]= TWO10; z[2]=ZERO; z[3]=X[1]; k=1;}
}
else if (p==2) {
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=X[2]; z[3]=ZERO; k=3;}
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; z[3]=X[2]; k=2;}
else {z[1]= TWO10; z[2]=ZERO; z[3]=X[1]; k=1;}
}
else {
if (EX==-42) {z[1]=X[1]+TWO10; z[2]=X[2]; k=3;}
else if (EX==-43) {z[1]= TWO10; z[2]=X[1]; k=2;}
else {z[1]= TWO10; z[2]=ZERO; k=1;}
z[3] = X[k];
}
u = (z[3] + TWO57) - TWO57;
if (u > z[3]) u -= TWO5;
if (u==z[3]) {
for (i=k+1; i <= p; i++) {
if (X[i] == ZERO) continue;
else {z[3] += ONE; break; }
}
}
c = X[0]*((z[1] + R*(z[2] + R*z[3])) - TWO10);
*y = c*TWOM1032;
return;
#undef R
}
/* Convert a multiple precision number *x into a double precision number *y. */
/* The result is correctly rounded to the nearest/even. *x is left unchanged */
void __mp_dbl(const mp_no *x, double *y, int p) {
#if 0
int i,k;
double a,c,u,v,z[5];
#endif
if (X[0] == ZERO) {*y = ZERO; return; }
if (EX> -42) norm(x,y,p);
else if (EX==-42 && X[1]>=TWO10) norm(x,y,p);
else denorm(x,y,p);
}
/* dbl_mp() converts a double precision number x into a multiple precision */
/* number *y. If the precision p is too small the result is truncated. x is */
/* left unchanged. */
void __dbl_mp(double x, mp_no *y, int p) {
int i,n;
double u;
/* Sign */
if (x == ZERO) {Y[0] = ZERO; return; }
else if (x > ZERO) Y[0] = ONE;
else {Y[0] = MONE; x=-x; }
/* Exponent */
for (EY=ONE; x >= RADIX; EY += ONE) x *= RADIXI;
for ( ; x < ONE; EY -= ONE) x *= RADIX;
/* Digits */
n=MIN(p,4);
for (i=1; i<=n; i++) {
u = (x + TWO52) - TWO52;
if (u>x) u -= ONE;
Y[i] = u; x -= u; x *= RADIX; }
for ( ; i<=p; i++) Y[i] = ZERO;
return;
}
/* add_magnitudes() adds the magnitudes of *x & *y assuming that */
/* abs(*x) >= abs(*y) > 0. */
/* The sign of the sum *z is undefined. x&y may overlap but not x&z or y&z. */
/* No guard digit is used. The result equals the exact sum, truncated. */
/* *x & *y are left unchanged. */
static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i,j,k;
EZ = EX;
i=p; j=p+ EY - EX; k=p+1;
if (j<1)
{__cpy(x,z,p); return; }
else Z[k] = ZERO;
for (; j>0; i--,j--) {
Z[k] += X[i] + Y[j];
if (Z[k] >= RADIX) {
Z[k] -= RADIX;
Z[--k] = ONE; }
else
Z[--k] = ZERO;
}
for (; i>0; i--) {
Z[k] += X[i];
if (Z[k] >= RADIX) {
Z[k] -= RADIX;
Z[--k] = ONE; }
else
Z[--k] = ZERO;
}
if (Z[1] == ZERO) {
for (i=1; i<=p; i++) Z[i] = Z[i+1]; }
else EZ += ONE;
}
/* sub_magnitudes() subtracts the magnitudes of *x & *y assuming that */
/* abs(*x) > abs(*y) > 0. */
/* The sign of the difference *z is undefined. x&y may overlap but not x&z */
/* or y&z. One guard digit is used. The error is less than one ulp. */
/* *x & *y are left unchanged. */
static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i,j,k;
EZ = EX;
if (EX == EY) {
i=j=k=p;
Z[k] = Z[k+1] = ZERO; }
else {
j= EX - EY;
if (j > p) {__cpy(x,z,p); return; }
else {
i=p; j=p+1-j; k=p;
if (Y[j] > ZERO) {
Z[k+1] = RADIX - Y[j--];
Z[k] = MONE; }
else {
Z[k+1] = ZERO;
Z[k] = ZERO; j--;}
}
}
for (; j>0; i--,j--) {
Z[k] += (X[i] - Y[j]);
if (Z[k] < ZERO) {
Z[k] += RADIX;
Z[--k] = MONE; }
else
Z[--k] = ZERO;
}
for (; i>0; i--) {
Z[k] += X[i];
if (Z[k] < ZERO) {
Z[k] += RADIX;
Z[--k] = MONE; }
else
Z[--k] = ZERO;
}
for (i=1; Z[i] == ZERO; i++) ;
EZ = EZ - i + 1;
for (k=1; i <= p+1; )
Z[k++] = Z[i++];
for (; k <= p; )
Z[k++] = ZERO;
return;
}
/* Add two multiple precision numbers. Set *z = *x + *y. x&y may overlap */
/* but not x&z or y&z. One guard digit is used. The error is less than */
/* one ulp. *x & *y are left unchanged. */
void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int n;
if (X[0] == ZERO) {__cpy(y,z,p); return; }
else if (Y[0] == ZERO) {__cpy(x,z,p); return; }
if (X[0] == Y[0]) {
if (__acr(x,y,p) > 0) {add_magnitudes(x,y,z,p); Z[0] = X[0]; }
else {add_magnitudes(y,x,z,p); Z[0] = Y[0]; }
}
else {
if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p); Z[0] = X[0]; }
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = Y[0]; }
else Z[0] = ZERO;
}
return;
}
/* Subtract two multiple precision numbers. *z is set to *x - *y. x&y may */
/* overlap but not x&z or y&z. One guard digit is used. The error is */
/* less than one ulp. *x & *y are left unchanged. */
void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int n;
if (X[0] == ZERO) {__cpy(y,z,p); Z[0] = -Z[0]; return; }
else if (Y[0] == ZERO) {__cpy(x,z,p); return; }
if (X[0] != Y[0]) {
if (__acr(x,y,p) > 0) {add_magnitudes(x,y,z,p); Z[0] = X[0]; }
else {add_magnitudes(y,x,z,p); Z[0] = -Y[0]; }
}
else {
if ((n=__acr(x,y,p)) == 1) {sub_magnitudes(x,y,z,p); Z[0] = X[0]; }
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = -Y[0]; }
else Z[0] = ZERO;
}
return;
}
/* Multiply two multiple precision numbers. *z is set to *x * *y. x&y */
/* may overlap but not x&z or y&z. In case p=1,2,3 the exact result is */
/* truncated to p digits. In case p>3 the error is bounded by 1.001 ulp. */
/* *x & *y are left unchanged. */
void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i, i1, i2, j, k, k2;
double u;
/* Is z=0? */
if (X[0]*Y[0]==ZERO)
{ Z[0]=ZERO; return; }
/* Multiply, add and carry */
k2 = (p<3) ? p+p : p+3;
Z[k2]=ZERO;
for (k=k2; k>1; ) {
if (k > p) {i1=k-p; i2=p+1; }
else {i1=1; i2=k; }
for (i=i1,j=i2-1; i<i2; i++,j--) Z[k] += X[i]*Y[j];
u = (Z[k] + CUTTER)-CUTTER;
if (u > Z[k]) u -= RADIX;
Z[k] -= u;
Z[--k] = u*RADIXI;
}
/* Is there a carry beyond the most significant digit? */
if (Z[1] == ZERO) {
for (i=1; i<=p; i++) Z[i]=Z[i+1];
EZ = EX + EY - 1; }
else
EZ = EX + EY;
Z[0] = X[0] * Y[0];
return;
}
/* Invert a multiple precision number. Set *y = 1 / *x. */
/* Relative error bound = 1.001*r**(1-p) for p=2, 1.063*r**(1-p) for p=3, */
/* 2.001*r**(1-p) for p>3. */
/* *x=0 is not permissible. *x is left unchanged. */
void __inv(const mp_no *x, mp_no *y, int p) {
int i;
#if 0
int l;
#endif
double t;
mp_no z,w;
static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
__cpy(x,&z,p); z.e=0; __mp_dbl(&z,&t,p);
t=ONE/t; __dbl_mp(t,y,p); EY -= EX;
for (i=0; i<np1[p]; i++) {
__cpy(y,&w,p);
__mul(x,&w,y,p);
__sub(&mptwo,y,&z,p);
__mul(&w,&z,y,p);
}
return;
}
/* Divide one multiple precision number by another.Set *z = *x / *y. *x & *y */
/* are left unchanged. x&y may overlap but not x&z or y&z. */
/* Relative error bound = 2.001*r**(1-p) for p=2, 2.063*r**(1-p) for p=3 */
/* and 3.001*r**(1-p) for p>3. *y=0 is not permissible. */
void __dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
mp_no w;
if (X[0] == ZERO) Z[0] = ZERO;
else {__inv(y,&w,p); __mul(x,&w,z,p);}
return;
}

View file

@ -1,90 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: mpa.h */
/* */
/* FUNCTIONS: */
/* mcr */
/* acr */
/* cr */
/* cpy */
/* cpymn */
/* mp_dbl */
/* dbl_mp */
/* add */
/* sub */
/* mul */
/* inv */
/* dvd */
/* */
/* Arithmetic functions for multiple precision numbers. */
/* Common types and definition */
/************************************************************************/
#ifndef MPA_H
#define MPA_H
typedef struct {/* This structure holds the details of a multi-precision */
int e; /* floating point number, x: d[0] holds its sign (-1,0 or 1) */
double d[40]; /* e holds its exponent (...,-2,-1,0,1,2,...) and */
} mp_no; /* d[1]...d[p] hold its mantissa digits. The value of x is, */
/* x = d[1]*r**(e-1) + d[2]*r**(e-2) + ... + d[p]*r**(e-p). */
/* Here r = 2**24, 0 <= d[i] < r and 1 <= p <= 32. */
/* p is a global variable. A multi-precision number is */
/* always normalized. Namely, d[1] > 0. An exception is */
/* a zero which is characterized by d[0] = 0. The terms */
/* d[p+1], d[p+2], ... of a none zero number have no */
/* significance and so are the terms e, d[1],d[2],... */
/* of a zero. */
typedef union { int i[2]; double d; } number;
#define X x->d
#define Y y->d
#define Z z->d
#define EX x->e
#define EY y->e
#define EZ z->e
#define ABS(x) ((x) < 0 ? -(x) : (x))
#define MIN(a,b) (((a)<(b))?(a):(b))
int __acr(const mp_no *, const mp_no *, int);
int __cr(const mp_no *, const mp_no *, int);
void __cpy(const mp_no *, mp_no *, int);
void __cpymn(const mp_no *, int, mp_no *, int);
void __mp_dbl(const mp_no *, double *, int);
void __dbl_mp(double, mp_no *, int);
void __add(const mp_no *, const mp_no *, mp_no *, int);
void __sub(const mp_no *, const mp_no *, mp_no *, int);
void __mul(const mp_no *, const mp_no *, mp_no *, int);
void __inv(const mp_no *, mp_no *, int);
void __dvd(const mp_no *, const mp_no *, mp_no *, int);
extern void __mpatan (mp_no *, mp_no *, int);
extern void __mpatan2 (mp_no *, mp_no *, mp_no *, int);
extern void __mpsqrt (mp_no *, mp_no *, int);
extern void __mpexp (mp_no *, mp_no *__y, int);
extern void __c32 (mp_no *, mp_no *, mp_no *, int);
extern int __mpranred (double, mp_no *, int);
#endif

View file

@ -1,98 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**************************************************************************/
/* */
/* MODULE_NAME:mpa2.h */
/* */
/* */
/* variables prototype and definition according to type of processor */
/* types definition */
/**************************************************************************/
#ifndef MPA2_H
#define MPA2_H
#ifdef BIG_ENDI
static const number
/**/ radix = {{0x41700000, 0x00000000} }, /* 2**24 */
/**/ radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
/**/ cutter = {{0x44b00000, 0x00000000} }, /* 2**76 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ mone = {{0xbff00000, 0x00000000} }, /* -1 */
/**/ two = {{0x40000000, 0x00000000} }, /* 2 */
/**/ half = {{0x3fe00000, 0x00000000} }, /* 1/2 */
/**/ two5 = {{0x40400000, 0x00000000} }, /* 2**5 */
/**/ two10 = {{0x40900000, 0x00000000} }, /* 2**10 */
/**/ two18 = {{0x41100000, 0x00000000} }, /* 2**18 */
/**/ two19 = {{0x41200000, 0x00000000} }, /* 2**19 */
/**/ two23 = {{0x41600000, 0x00000000} }, /* 2**23 */
/**/ two52 = {{0x43300000, 0x00000000} }, /* 2**52 */
/**/ two57 = {{0x43800000, 0x00000000} }, /* 2**57 */
/**/ two71 = {{0x44600000, 0x00000000} }, /* 2**71 */
/**/ twom1032 = {{0x00000400, 0x00000000} }; /* 2**-1032 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ radix = {{0x00000000, 0x41700000} }, /* 2**24 */
/**/ radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
/**/ cutter = {{0x00000000, 0x44b00000} }, /* 2**76 */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ mone = {{0x00000000, 0xbff00000} }, /* -1 */
/**/ two = {{0x00000000, 0x40000000} }, /* 2 */
/**/ half = {{0x00000000, 0x3fe00000} }, /* 1/2 */
/**/ two5 = {{0x00000000, 0x40400000} }, /* 2**5 */
/**/ two10 = {{0x00000000, 0x40900000} }, /* 2**10 */
/**/ two18 = {{0x00000000, 0x41100000} }, /* 2**18 */
/**/ two19 = {{0x00000000, 0x41200000} }, /* 2**19 */
/**/ two23 = {{0x00000000, 0x41600000} }, /* 2**23 */
/**/ two52 = {{0x00000000, 0x43300000} }, /* 2**52 */
/**/ two57 = {{0x00000000, 0x43800000} }, /* 2**57 */
/**/ two71 = {{0x00000000, 0x44600000} }, /* 2**71 */
/**/ twom1032 = {{0x00000000, 0x00000400} }; /* 2**-1032 */
#endif
#endif
#define RADIX radix.d
#define RADIXI radixi.d
#define CUTTER cutter.d
#define ZERO zero.d
#define ONE one.d
#define MONE mone.d
#define TWO two.d
#define HALF half.d
#define TWO5 two5.d
#define TWO10 two10.d
#define TWO18 two18.d
#define TWO19 two19.d
#define TWO23 two23.d
#define TWO52 two52.d
#define TWO57 two57.d
#define TWO71 two71.d
#define TWOM1032 twom1032.d
#endif

View file

@ -1,102 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mpatan.c */
/* */
/* FUNCTIONS:mpatan */
/* */
/* FILES NEEDED: mpa.h endian.h mpatan.h */
/* mpa.c */
/* */
/* Multi-Precision Atan function subroutine, for precision p >= 4.*/
/* The relative error of the result is bounded by 34.32*r**(1-p), */
/* where r=2**24. */
/******************************************************************/
#include "endian.h"
#include "mpa.h"
void __mpsqrt(mp_no *, mp_no *, int);
void __mpatan(mp_no *x, mp_no *y, int p) {
#include "mpatan.h"
int i,m,n;
double dx;
mp_no
mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mptwo = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mptwoim1 = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3;
/* Choose m and initiate mpone, mptwo & mptwoim1 */
if (EX>0) m=7;
else if (EX<0) m=0;
else {
__mp_dbl(x,&dx,p); dx=ABS(dx);
for (m=6; m>0; m--)
{if (dx>xm[m].d) break;}
}
mpone.e = mptwo.e = mptwoim1.e = 1;
mpone.d[0] = mpone.d[1] = mptwo.d[0] = mptwoim1.d[0] = ONE;
mptwo.d[1] = TWO;
/* Reduce x m times */
__mul(x,x,&mpsm,p);
if (m==0) __cpy(x,&mps,p);
else {
for (i=0; i<m; i++) {
__add(&mpone,&mpsm,&mpt1,p);
__mpsqrt(&mpt1,&mpt2,p);
__add(&mpt2,&mpt2,&mpt1,p);
__add(&mptwo,&mpsm,&mpt2,p);
__add(&mpt1,&mpt2,&mpt3,p);
__dvd(&mpsm,&mpt3,&mpt1,p);
__cpy(&mpt1,&mpsm,p);
}
__mpsqrt(&mpsm,&mps,p); mps.d[0] = X[0];
}
/* Evaluate a truncated power series for Atan(s) */
n=np[p]; mptwoim1.d[1] = twonm1[p].d;
__dvd(&mpsm,&mptwoim1,&mpt,p);
for (i=n-1; i>1; i--) {
mptwoim1.d[1] -= TWO;
__dvd(&mpsm,&mptwoim1,&mpt1,p);
__mul(&mpsm,&mpt,&mpt2,p);
__sub(&mpt1,&mpt2,&mpt,p);
}
__mul(&mps,&mpt,&mpt1,p);
__sub(&mps,&mpt1,&mpt,p);
/* Compute Atan(x) */
mptwoim1.d[1] = twom[m].d;
__mul(&mptwoim1,&mpt,y,p);
return;
}

View file

@ -1,174 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mpatan.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef MPATAN_H
#define MPATAN_H
#ifdef BIG_ENDI
static const number
xm[8] = { /* x[m] */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x3f8930be, 0x00000000} }, /* 0.0123 */
/**/ {{0x3f991687, 0x00000000} }, /* 0.0245 */
/**/ {{0x3fa923a2, 0x00000000} }, /* 0.0491 */
/**/ {{0x3fb930be, 0x00000000} }, /* 0.0984 */
/**/ {{0x3fc95810, 0x00000000} }, /* 0.198 */
/**/ {{0x3fda7ef9, 0x00000000} }, /* 0.414 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
};
static const number
twonm1[33] = { /* 2n-1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x40260000, 0x00000000} }, /* 11 */
/**/ {{0x402e0000, 0x00000000} }, /* 15 */
/**/ {{0x40330000, 0x00000000} }, /* 19 */
/**/ {{0x40350000, 0x00000000} }, /* 21 */
/**/ {{0x40390000, 0x00000000} }, /* 25 */
/**/ {{0x403d0000, 0x00000000} }, /* 29 */
/**/ {{0x40408000, 0x00000000} }, /* 33 */
/**/ {{0x40428000, 0x00000000} }, /* 37 */
/**/ {{0x40448000, 0x00000000} }, /* 41 */
/**/ {{0x40468000, 0x00000000} }, /* 45 */
/**/ {{0x40488000, 0x00000000} }, /* 49 */
/**/ {{0x404a8000, 0x00000000} }, /* 53 */
/**/ {{0x404b8000, 0x00000000} }, /* 55 */
/**/ {{0x404d8000, 0x00000000} }, /* 59 */
/**/ {{0x404f8000, 0x00000000} }, /* 63 */
/**/ {{0x4050c000, 0x00000000} }, /* 67 */
/**/ {{0x4051c000, 0x00000000} }, /* 71 */
/**/ {{0x4052c000, 0x00000000} }, /* 75 */
/**/ {{0x4053c000, 0x00000000} }, /* 79 */
/**/ {{0x4054c000, 0x00000000} }, /* 83 */
/**/ {{0x40554000, 0x00000000} }, /* 85 */
/**/ {{0x40564000, 0x00000000} }, /* 89 */
/**/ {{0x40574000, 0x00000000} }, /* 93 */
/**/ {{0x40584000, 0x00000000} }, /* 97 */
/**/ {{0x40594000, 0x00000000} }, /* 101 */
/**/ {{0x405a4000, 0x00000000} }, /* 105 */
/**/ {{0x405b4000, 0x00000000} }, /* 109 */
/**/ {{0x405c4000, 0x00000000} }, /* 113 */
/**/ {{0x405d4000, 0x00000000} }, /* 117 */
};
static const number
twom[8] = { /* 2**m */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
/**/ {{0x40000000, 0x00000000} }, /* 2.0 */
/**/ {{0x40100000, 0x00000000} }, /* 4.0 */
/**/ {{0x40200000, 0x00000000} }, /* 8.0 */
/**/ {{0x40300000, 0x00000000} }, /* 16.0 */
/**/ {{0x40400000, 0x00000000} }, /* 32.0 */
/**/ {{0x40500000, 0x00000000} }, /* 64.0 */
/**/ {{0x40600000, 0x00000000} }, /* 128.0 */
};
static const number
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ two = {{0x40000000, 0x00000000} }; /* 2 */
#else
#ifdef LITTLE_ENDI
static const number
xm[8] = { /* x[m] */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x00000000, 0x3f8930be} }, /* 0.0123 */
/**/ {{0x00000000, 0x3f991687} }, /* 0.0245 */
/**/ {{0x00000000, 0x3fa923a2} }, /* 0.0491 */
/**/ {{0x00000000, 0x3fb930be} }, /* 0.0984 */
/**/ {{0x00000000, 0x3fc95810} }, /* 0.198 */
/**/ {{0x00000000, 0x3fda7ef9} }, /* 0.414 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
};
static const number
twonm1[33] = { /* 2n-1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x40260000} }, /* 11 */
/**/ {{0x00000000, 0x402e0000} }, /* 15 */
/**/ {{0x00000000, 0x40330000} }, /* 19 */
/**/ {{0x00000000, 0x40350000} }, /* 21 */
/**/ {{0x00000000, 0x40390000} }, /* 25 */
/**/ {{0x00000000, 0x403d0000} }, /* 29 */
/**/ {{0x00000000, 0x40408000} }, /* 33 */
/**/ {{0x00000000, 0x40428000} }, /* 37 */
/**/ {{0x00000000, 0x40448000} }, /* 41 */
/**/ {{0x00000000, 0x40468000} }, /* 45 */
/**/ {{0x00000000, 0x40488000} }, /* 49 */
/**/ {{0x00000000, 0x404a8000} }, /* 53 */
/**/ {{0x00000000, 0x404b8000} }, /* 55 */
/**/ {{0x00000000, 0x404d8000} }, /* 59 */
/**/ {{0x00000000, 0x404f8000} }, /* 63 */
/**/ {{0x00000000, 0x4050c000} }, /* 67 */
/**/ {{0x00000000, 0x4051c000} }, /* 71 */
/**/ {{0x00000000, 0x4052c000} }, /* 75 */
/**/ {{0x00000000, 0x4053c000} }, /* 79 */
/**/ {{0x00000000, 0x4054c000} }, /* 83 */
/**/ {{0x00000000, 0x40554000} }, /* 85 */
/**/ {{0x00000000, 0x40564000} }, /* 89 */
/**/ {{0x00000000, 0x40574000} }, /* 93 */
/**/ {{0x00000000, 0x40584000} }, /* 97 */
/**/ {{0x00000000, 0x40594000} }, /* 101 */
/**/ {{0x00000000, 0x405a4000} }, /* 105 */
/**/ {{0x00000000, 0x405b4000} }, /* 109 */
/**/ {{0x00000000, 0x405c4000} }, /* 113 */
/**/ {{0x00000000, 0x405d4000} }, /* 117 */
};
static const number
twom[8] = { /* 2**m */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
/**/ {{0x00000000, 0x40000000} }, /* 2.0 */
/**/ {{0x00000000, 0x40100000} }, /* 4.0 */
/**/ {{0x00000000, 0x40200000} }, /* 8.0 */
/**/ {{0x00000000, 0x40300000} }, /* 16.0 */
/**/ {{0x00000000, 0x40400000} }, /* 32.0 */
/**/ {{0x00000000, 0x40500000} }, /* 64.0 */
/**/ {{0x00000000, 0x40600000} }, /* 128.0 */
};
static const number
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ two = {{0x00000000, 0x40000000} }; /* 2 */
#endif
#endif
#define ONE one.d
#define TWO two.d
static const int
np[33] = { 0, 0, 0, 0, 6, 8,10,11,13,15,17,19,21,23,25,27,28,
30,32,34,36,38,40,42,43,45,47,49,51,53,55,57,59};
#endif

View file

@ -1,70 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* MODULE_NAME: mpatan2.c */
/* */
/* FUNCTIONS:mpatan2 */
/* */
/* FILES NEEDED: mpa.h */
/* mpa.c mpatan.c mpsqrt.c */
/* */
/* Multi-Precision Atan2(y,x) function subroutine, */
/* for precision p >= 4. */
/* y=0 is not permitted if x<=0. No error messages are given. */
/* The relative error of the result is bounded by 44.84*r**(1-p) */
/* if x <= 0, y != 0 and by 37.33*r**(1-p) if x>0. here r=2**24. */
/* */
/******************************************************************/
#include "mpa.h"
void __mpsqrt(mp_no *, mp_no *, int);
void __mpatan(mp_no *, mp_no *, int);
/* Multi-Precision Atan2(y,x) function subroutine, for p >= 4. */
/* y=0 is not permitted if x<=0. No error messages are given. */
void __mpatan2(mp_no *y, mp_no *x, mp_no *z, int p) {
static const double Zero = 0.0, One = 1.0;
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpt1,mpt2,mpt3;
if (X[0] <= Zero) {
mpone.e = 1; mpone.d[0] = mpone.d[1] = One;
__dvd(x,y,&mpt1,p); __mul(&mpt1,&mpt1,&mpt2,p);
if (mpt1.d[0] != Zero) mpt1.d[0] = One;
__add(&mpt2,&mpone,&mpt3,p); __mpsqrt(&mpt3,&mpt2,p);
__add(&mpt1,&mpt2,&mpt3,p); mpt3.d[0]=Y[0];
__mpatan(&mpt3,&mpt1,p); __add(&mpt1,&mpt1,z,p);
}
else
{ __dvd(y,x,&mpt1,p);
__mpatan(&mpt1,z,p);
}
return;
}

View file

@ -1,106 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*************************************************************************/
/* MODULE_NAME:mpexp.c */
/* */
/* FUNCTIONS: mpexp */
/* */
/* FILES NEEDED: mpa.h endian.h mpexp.h */
/* mpa.c */
/* */
/* Multi-Precision exponential function subroutine */
/* ( for p >= 4, 2**(-55) <= abs(x) <= 1024 ). */
/*************************************************************************/
#include "endian.h"
#include "mpa.h"
#include "mpa2.h"
#include "mpexp.h"
/* Multi-Precision exponential function subroutine (for p >= 4, */
/* 2**(-55) <= abs(x) <= 1024). */
void __mpexp(mp_no *x, mp_no *y, int p) {
int i,j,k,m,m1,m2,n;
double a,b;
static const int np[33] = {0,0,0,0,3,3,4,4,5,4,4,5,5,5,6,6,6,6,6,6,
6,6,6,6,7,7,7,7,8,8,8,8,8};
static const int m1p[33]= {0,0,0,0,17,23,23,28,27,38,42,39,43,47,43,47,50,54,
57,60,64,67,71,74,68,71,74,77,70,73,76,78,81};
static const int m1np[7][18] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0,36,48,60,72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0,24,32,40,48,56,64,72, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0,17,23,29,35,41,47,53,59,65, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0,23,28,33,38,42,47,52,57,62,66, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 0,39,43,47,51,55,59,63},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43,47,50,54}};
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpk = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpak,mpt1,mpt2;
/* Choose m,n and compute a=2**(-m) */
n = np[p]; m1 = m1p[p]; a = twomm1[p].d;
for (i=0; i<EX; i++) a *= RADIXI;
for ( ; i>EX; i--) a *= RADIX;
b = X[1]*RADIXI; m2 = 24*EX;
for (; b<HALF; m2--) { a *= TWO; b *= TWO; }
if (b == HALF) {
for (i=2; i<=p; i++) { if (X[i]!=ZERO) break; }
if (i==p+1) { m2--; a *= TWO; }
}
if ((m=m1+m2) <= 0) {
m=0; a=ONE;
for (i=n-1; i>0; i--,n--) { if (m1np[i][p]+m2>0) break; }
}
/* Compute s=x*2**(-m). Put result in mps */
__dbl_mp(a,&mpt1,p);
__mul(x,&mpt1,&mps,p);
/* Evaluate the polynomial. Put result in mpt2 */
mpone.e=1; mpone.d[0]=ONE; mpone.d[1]=ONE;
mpk.e = 1; mpk.d[0] = ONE; mpk.d[1]=nn[n].d;
__dvd(&mps,&mpk,&mpt1,p);
__add(&mpone,&mpt1,&mpak,p);
for (k=n-1; k>1; k--) {
__mul(&mps,&mpak,&mpt1,p);
mpk.d[1]=nn[k].d;
__dvd(&mpt1,&mpk,&mpt2,p);
__add(&mpone,&mpt2,&mpak,p);
}
__mul(&mps,&mpak,&mpt1,p);
__add(&mpone,&mpt1,&mpt2,p);
/* Raise polynomial value to the power of 2**m. Put result in y */
for (k=0,j=0; k<m; ) {
__mul(&mpt2,&mpt2,&mpt1,p); k++;
if (k==m) { j=1; break; }
__mul(&mpt1,&mpt1,&mpt2,p); k++;
}
if (j) __cpy(&mpt1,y,p);
else __cpy(&mpt2,y,p);
return;
}

View file

@ -1,135 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mpexp.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef MPEXP_H
#define MPEXP_H
#ifdef BIG_ENDI
static const number
twomm1[33] = { /* 2**-m1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x3ee00000, 0x00000000} }, /* 2**-17 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
/**/ {{0x3e300000, 0x00000000} }, /* 2**-28 */
/**/ {{0x3e400000, 0x00000000} }, /* 2**-27 */
/**/ {{0x3d900000, 0x00000000} }, /* 2**-38 */
/**/ {{0x3d500000, 0x00000000} }, /* 2**-42 */
/**/ {{0x3d800000, 0x00000000} }, /* 2**-39 */
/**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
/**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
/**/ {{0x3d400000, 0x00000000} }, /* 2**-43 */
/**/ {{0x3d000000, 0x00000000} }, /* 2**-47 */
/**/ {{0x3cd00000, 0x00000000} }, /* 2**-50 */
/**/ {{0x3c900000, 0x00000000} }, /* 2**-54 */
/**/ {{0x3c600000, 0x00000000} }, /* 2**-57 */
/**/ {{0x3c300000, 0x00000000} }, /* 2**-60 */
/**/ {{0x3bf00000, 0x00000000} }, /* 2**-64 */
/**/ {{0x3bc00000, 0x00000000} }, /* 2**-67 */
/**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
/**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
/**/ {{0x3bb00000, 0x00000000} }, /* 2**-68 */
/**/ {{0x3b800000, 0x00000000} }, /* 2**-71 */
/**/ {{0x3b500000, 0x00000000} }, /* 2**-74 */
/**/ {{0x3b200000, 0x00000000} }, /* 2**-77 */
/**/ {{0x3b900000, 0x00000000} }, /* 2**-70 */
/**/ {{0x3b600000, 0x00000000} }, /* 2**-73 */
/**/ {{0x3b300000, 0x00000000} }, /* 2**-76 */
/**/ {{0x3b100000, 0x00000000} }, /* 2**-78 */
/**/ {{0x3ae00000, 0x00000000} }, /* 2**-81 */
};
static const number
nn[9]={ /* n */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ {{0x40000000, 0x00000000} }, /* 2 */
/**/ {{0x40080000, 0x00000000} }, /* 3 */
/**/ {{0x40100000, 0x00000000} }, /* 4 */
/**/ {{0x40140000, 0x00000000} }, /* 5 */
/**/ {{0x40180000, 0x00000000} }, /* 6 */
/**/ {{0x401c0000, 0x00000000} }, /* 7 */
/**/ {{0x40200000, 0x00000000} }, /* 8 */
};
#else
#ifdef LITTLE_ENDI
static const number
twomm1[33] = { /* 2**-m1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x3ee00000} }, /* 2**-17 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
/**/ {{0x00000000, 0x3e300000} }, /* 2**-28 */
/**/ {{0x00000000, 0x3e400000} }, /* 2**-27 */
/**/ {{0x00000000, 0x3d900000} }, /* 2**-38 */
/**/ {{0x00000000, 0x3d500000} }, /* 2**-42 */
/**/ {{0x00000000, 0x3d800000} }, /* 2**-39 */
/**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
/**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
/**/ {{0x00000000, 0x3d400000} }, /* 2**-43 */
/**/ {{0x00000000, 0x3d000000} }, /* 2**-47 */
/**/ {{0x00000000, 0x3cd00000} }, /* 2**-50 */
/**/ {{0x00000000, 0x3c900000} }, /* 2**-54 */
/**/ {{0x00000000, 0x3c600000} }, /* 2**-57 */
/**/ {{0x00000000, 0x3c300000} }, /* 2**-60 */
/**/ {{0x00000000, 0x3bf00000} }, /* 2**-64 */
/**/ {{0x00000000, 0x3bc00000} }, /* 2**-67 */
/**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
/**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
/**/ {{0x00000000, 0x3bb00000} }, /* 2**-68 */
/**/ {{0x00000000, 0x3b800000} }, /* 2**-71 */
/**/ {{0x00000000, 0x3b500000} }, /* 2**-74 */
/**/ {{0x00000000, 0x3b200000} }, /* 2**-77 */
/**/ {{0x00000000, 0x3b900000} }, /* 2**-70 */
/**/ {{0x00000000, 0x3b600000} }, /* 2**-73 */
/**/ {{0x00000000, 0x3b300000} }, /* 2**-76 */
/**/ {{0x00000000, 0x3b100000} }, /* 2**-78 */
/**/ {{0x00000000, 0x3ae00000} }, /* 2**-81 */
};
static const number
nn[9]={ /* n */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ {{0x00000000, 0x40000000} }, /* 2 */
/**/ {{0x00000000, 0x40080000} }, /* 3 */
/**/ {{0x00000000, 0x40100000} }, /* 4 */
/**/ {{0x00000000, 0x40140000} }, /* 5 */
/**/ {{0x00000000, 0x40180000} }, /* 6 */
/**/ {{0x00000000, 0x401c0000} }, /* 7 */
/**/ {{0x00000000, 0x40200000} }, /* 8 */
};
#endif
#endif
#endif

View file

@ -1,72 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* */
/* MODULE_NAME:mplog.c */
/* */
/* FUNCTIONS: mplog */
/* */
/* FILES NEEDED: endian.h mpa.h mplog.h */
/* mpexp.c */
/* */
/* Multi-Precision logarithm function subroutine (for precision p >= 4, */
/* 2**(-1024) < x < 2**1024) and x is outside of the interval */
/* [1-2**(-54),1+2**(-54)]. Upon entry, x should be set to the */
/* multi-precision value of the input and y should be set into a multi- */
/* precision value of an approximation of log(x) with relative error */
/* bound of at most 2**(-52). The routine improves the accuracy of y. */
/* */
/************************************************************************/
#include "endian.h"
#include "mpa.h"
void __mpexp(mp_no *, mp_no *, int);
void __mplog(mp_no *x, mp_no *y, int p) {
#include "mplog.h"
int i,m;
#if 0
int j,k,m1,m2,n;
double a,b;
#endif
static const int mp[33] = {0,0,0,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4};
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpt1,mpt2;
/* Choose m and initiate mpone */
m = mp[p]; mpone.e = 1; mpone.d[0]=mpone.d[1]=ONE;
/* Perform m newton iterations to solve for y: exp(y)-x=0. */
/* The iterations formula is: y(n+1)=y(n)+(x*exp(-y(n))-1). */
__cpy(y,&mpt1,p);
for (i=0; i<m; i++) {
mpt1.d[0]=-mpt1.d[0];
__mpexp(&mpt1,&mpt2,p);
__mul(x,&mpt2,&mpt1,p);
__sub(&mpt1,&mpone,&mpt2,p);
__add(y,&mpt2,&mpt1,p);
__cpy(&mpt1,y,p);
}
return;
}

View file

@ -1,45 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mplog.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef MPLOG_H
#define MPLOG_H
#ifdef BIG_ENDI
static const number
/**/ one = {{0x3ff00000, 0x00000000} }; /* 1 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ one = {{0x00000000, 0x3ff00000} }; /* 1 */
#endif
#endif
#define ONE one.d
#endif

View file

@ -1,103 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************************/
/* MODULE_NAME:mpsqrt.c */
/* */
/* FUNCTION:mpsqrt */
/* fastiroot */
/* */
/* FILES NEEDED:endian.h mpa.h mpsqrt.h */
/* mpa.c */
/* Multi-Precision square root function subroutine for precision p >= 4. */
/* The relative error is bounded by 3.501*r**(1-p), where r=2**24. */
/* */
/****************************************************************************/
#include "endian.h"
#include "mpa.h"
/****************************************************************************/
/* Multi-Precision square root function subroutine for precision p >= 4. */
/* The relative error is bounded by 3.501*r**(1-p), where r=2**24. */
/* Routine receives two pointers to Multi Precision numbers: */
/* x (left argument) and y (next argument). Routine also receives precision */
/* p as integer. Routine computes sqrt(*x) and stores result in *y */
/****************************************************************************/
double fastiroot(double);
void __mpsqrt(mp_no *x, mp_no *y, int p) {
#include "mpsqrt.h"
int i,m,ex,ey;
double dx,dy;
mp_no
mphalf = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mp3halfs = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpxn,mpz,mpu,mpt1,mpt2;
/* Prepare multi-precision 1/2 and 3/2 */
mphalf.e =0; mphalf.d[0] =ONE; mphalf.d[1] =HALFRAD;
mp3halfs.e=1; mp3halfs.d[0]=ONE; mp3halfs.d[1]=ONE; mp3halfs.d[2]=HALFRAD;
ex=EX; ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
__mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); __dbl_mp(dy,&mpu,p);
__mul(&mpxn,&mphalf,&mpz,p);
m=mp[p];
for (i=0; i<m; i++) {
__mul(&mpu,&mpu,&mpt1,p);
__mul(&mpt1,&mpz,&mpt2,p);
__sub(&mp3halfs,&mpt2,&mpt1,p);
__mul(&mpu,&mpt1,&mpt2,p);
__cpy(&mpt2,&mpu,p);
}
__mul(&mpxn,&mpu,y,p); EY += ey;
return;
}
/***********************************************************/
/* Compute a double precision approximation for 1/sqrt(x) */
/* with the relative error bounded by 2**-51. */
/***********************************************************/
double fastiroot(double x) {
union {int i[2]; double d;} p,q;
double y,z, t;
int n;
static const double c0 = 0.99674, c1 = -0.53380, c2 = 0.45472, c3 = -0.21553;
p.d = x;
p.i[HIGH_HALF] = (p.i[HIGH_HALF] & 0x3FFFFFFF ) | 0x3FE00000 ;
q.d = x;
y = p.d;
z = y -1.0;
n = (q.i[HIGH_HALF] - p.i[HIGH_HALF])>>1;
z = ((c3*z + c2)*z + c1)*z + c0; /* 2**-7 */
z = z*(1.5 - 0.5*y*z*z); /* 2**-14 */
p.d = z*(1.5 - 0.5*y*z*z); /* 2**-28 */
p.i[HIGH_HALF] -= n;
t = x*p.d;
return p.d*(1.5 - 0.5*p.d*t);
}

View file

@ -1,51 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mpatan.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef MPSQRT_H
#define MPSQRT_H
#ifdef BIG_ENDI
static const number
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ halfrad = {{0x41600000, 0x00000000} }; /* 2**23 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ halfrad = {{0x00000000, 0x41600000} }; /* 2**23 */
#endif
#endif
#define ONE one.d
#define HALFRAD halfrad.d
static const int mp[33] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4};
#endif

View file

@ -1,60 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**********************************************************************/
/* MODULE_NAME:mptan.c */
/* */
/* FUNCTION: mptan */
/* */
/* FILES NEEDED: endian.h mpa.h */
/* mpa.c sincos32.c branred.c */
/* */
/* Multi-Precision tan() function subroutine, for p=32. It is based */
/* on the routines mpranred() and c32(). mpranred() performs range */
/* reduction of a double number x into a multiple precision number */
/* y, such that y=x-n*pi/2, abs(y)<pi/4, n=0,+-1,+-2,.... c32() */
/* computes both sin(y), cos(y). tan(x) is either sin(y)/cos(y) */
/* or -cos(y)/sin(y). The precision of the result is of about 559 */
/* significant bits. */
/* */
/**********************************************************************/
#include "endian.h"
#include "mpa.h"
int __mpranred(double, mp_no *, int);
void __c32(mp_no *, mp_no *, mp_no *, int);
void __mptan(double x, mp_no *mpy, int p) {
static const double Mone = -1.0;
int n;
mp_no mpw, mpc, mps;
n = __mpranred(x, &mpw, p) & 0x00000001; /* negative or positive result */
__c32(&mpw, &mpc, &mps, p); /* computing sin(x) and cos(x) */
if (n) /* second or fourth quarter of unit circle */
{ __dvd(&mpc,&mps,mpy,p);
mpy->d[0] *= Mone;
} /* tan is negative in this area */
else __dvd(&mps,&mpc,mpy,p);
return;
}

View file

@ -1,38 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:mydefs.h */
/* */
/* common data and definition */
/******************************************************************/
#ifndef MY_H
#define MY_H
typedef int int4;
typedef union {int4 i[2]; double x;} mynumber;
#define ABS(x) (((x)>0)?(x):-(x))
#define max(x,y) (((y)>(x))?(y):(x))
#define min(x,y) (((y)<(x))?(y):(x))
#endif

View file

@ -1,32 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************/
/* TABLES FOR THE upow() FUNCTION */
/****************************************************************/
static const double powtwo[] = { 1.0, 2.0, 4.0,
8.0, 16.0, 32.0, 64.0, 128.0,
256.0, 512.0, 1024.0, 2048.0, 4096.0,
8192.0, 16384.0, 32768.0, 65536.0, 131072.0,
262144.0, 524288.0, 1048576.0, 2097152.0, 4194304.0,
8388608.0, 16777216.0, 33554432.0, 67108864.0, 134217728.0 };

View file

@ -1,58 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************/
/* TABLES FOR THE usqrt() FUNCTION */
/****************************************************************/
static const double inroot[128] = {
1.40872145012100, 1.39792649065766, 1.38737595123859, 1.37706074531819,
1.36697225234682, 1.35710228748795, 1.34744307370643, 1.33798721601135,
1.32872767765984, 1.31965775814772, 1.31077107283046, 1.30206153403386,
1.29352333352711, 1.28515092624400, 1.27693901514820, 1.26888253714903,
1.26097664998256, 1.25321671998073, 1.24559831065844, 1.23811717205462,
1.23076923076923, 1.22355058064300, 1.21645747403153, 1.20948631362953,
1.20263364480453, 1.19589614840310, 1.18927063399547, 1.18275403352732,
1.17634339535009, 1.17003587860341, 1.16382874792529, 1.15771936846787,
1.15170520119791, 1.14578379846309, 1.13995279980655, 1.13420992801334,
1.12855298537376, 1.12297985014975, 1.11748847323133, 1.11207687497107,
1.10674314218572, 1.10148542531442, 1.09630193572405, 1.09119094315276,
1.08615077328341, 1.08117980543918, 1.07627647039410, 1.07143924829188,
1.06666666666667, 1.06195729855996, 1.05730976072814, 1.05272271193563,
1.04819485132867, 1.04372491688551, 1.03931168393861, 1.03495396376504,
1.03065060224133, 1.02640047855933, 1.02220250399990, 1.01805562076124,
1.01395880083916, 1.00991104495649, 1.00591138153909, 1.00195886573624,
0.99611649018350, 0.98848330114434, 0.98102294317595, 0.97372899112030,
0.96659534932828, 0.95961623024651, 0.95278613468066, 0.94609983358253,
0.93955235122353, 0.93313894963169, 0.92685511418159, 0.92069654023750,
0.91465912076005, 0.90873893479530, 0.90293223677296, 0.89723544654727,
0.89164514012056, 0.88615804099474, 0.88077101210109, 0.87548104826333,
0.87028526915267, 0.86518091269740, 0.86016532891275, 0.85523597411976,
0.85039040552437, 0.84562627613070, 0.84094132996422, 0.83633339758291,
0.83180039185606, 0.82734030399203, 0.82295119979782, 0.81863121615464,
0.81437855769486, 0.81019149366693, 0.80606835497581, 0.80200753138734,
0.79800746888611, 0.79406666717674, 0.79018367731967, 0.78635709949278,
0.78258558087123, 0.77886781361798, 0.77520253297841, 0.77158851547266,
0.76802457717971, 0.76450957210799, 0.76104239064719, 0.75762195809661,
0.75424723326565, 0.75091720714229, 0.74763090162560, 0.74438736831878,
0.74118568737933, 0.73802496642311, 0.73490433947940, 0.73182296599416,
0.72878002987884, 0.72577473860242, 0.72280632232420, 0.71987403306536,
0.71697714391715, 0.71411494828392, 0.71128675915902, 0.70849190843208 };

View file

@ -1,229 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: atnat.c */
/* */
/* FUNCTIONS: uatan */
/* atanMp */
/* signArctan */
/* */
/* */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h atnat.h */
/* mpatan.c mpatan2.c mpsqrt.c */
/* uatan.tbl */
/* */
/* An ultimate atan() routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of atan(x). */
/* */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/************************************************************************/
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
#include "uatan.tbl"
#include "atnat.h"
void __mpatan(mp_no *,mp_no *,int); /* see definition in mpatan.c */
static double atanMp(double,const int[]);
double __signArctan(double,double);
/* An ultimate atan() routine. Given an IEEE double machine number x, */
/* routine computes the correctly rounded (to nearest) value of atan(x). */
double atan(double x) {
double cor,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,u,u2,u3,
v,vv,w,ww,y,yy,z,zz;
#if 0
double y1,y2;
#endif
int i,ux,dx;
#if 0
int p;
#endif
static const int pr[M]={6,8,10,32};
number num;
#if 0
mp_no mpt1,mpx,mpy,mpy1,mpy2,mperr;
#endif
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
/* x=NaN */
if (((ux&0x7ff00000)==0x7ff00000) && (((ux&0x000fffff)|dx)!=0x00000000))
return x+x;
/* Regular values of x, including denormals +-0 and +-INF */
u = (x<ZERO) ? -x : x;
if (u<C) {
if (u<B) {
if (u<A) { /* u < A */
return x; }
else { /* A <= u < B */
v=x*x; yy=x*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
if ((y=x+(yy-U1*x)) == x+(yy+U1*x)) return y;
EMULV(x,x,v,vv,t1,t2,t3,t4,t5) /* v+vv=x^2 */
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(x,ZERO,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(x,ZERO,s2,ss2,s1,ss1,t1,t2)
if ((y=s1+(ss1-U5*s1)) == s1+(ss1+U5*s1)) return y;
return atanMp(x,pr);
} }
else { /* B <= u < C */
i=(TWO52+TWO8*u)-TWO52; i-=16;
z=u-cij[i][0].d;
yy=z*(cij[i][2].d+z*(cij[i][3].d+z*(cij[i][4].d+
z*(cij[i][5].d+z* cij[i][6].d))));
t1=cij[i][1].d;
if (i<112) {
if (i<48) u2=U21; /* u < 1/4 */
else u2=U22; } /* 1/4 <= u < 1/2 */
else {
if (i<176) u2=U23; /* 1/2 <= u < 3/4 */
else u2=U24; } /* 3/4 <= u <= 1 */
if ((y=t1+(yy-u2*t1)) == t1+(yy+u2*t1)) return __signArctan(x,y);
z=u-hij[i][0].d;
s1=z*(hij[i][11].d+z*(hij[i][12].d+z*(hij[i][13].d+
z*(hij[i][14].d+z* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(z,ZERO,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,ZERO,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,ZERO,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,ZERO,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
if ((y=s2+(ss2-U6*s2)) == s2+(ss2+U6*s2)) return __signArctan(x,y);
return atanMp(x,pr);
}
}
else {
if (u<D) { /* C <= u < D */
w=ONE/u;
EMULV(w,u,t1,t2,t3,t4,t5,t6,t7)
ww=w*((ONE-t1)-t2);
i=(TWO52+TWO8*w)-TWO52; i-=16;
z=(w-cij[i][0].d)+ww;
yy=HPI1-z*(cij[i][2].d+z*(cij[i][3].d+z*(cij[i][4].d+
z*(cij[i][5].d+z* cij[i][6].d))));
t1=HPI-cij[i][1].d;
if (i<112) u3=U31; /* w < 1/2 */
else u3=U32; /* w >= 1/2 */
if ((y=t1+(yy-u3)) == t1+(yy+u3)) return __signArctan(x,y);
DIV2(ONE,ZERO,u,ZERO,w,ww,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
t1=w-hij[i][0].d;
EADD(t1,ww,z,zz)
s1=z*(hij[i][11].d+z*(hij[i][12].d+z*(hij[i][13].d+
z*(hij[i][14].d+z* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(z,zz,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,zz,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,zz,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
MUL2(z,zz,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
SUB2(HPI,HPI1,s2,ss2,s1,ss1,t1,t2)
if ((y=s1+(ss1-U7)) == s1+(ss1+U7)) return __signArctan(x,y);
return atanMp(x,pr);
}
else {
if (u<E) { /* D <= u < E */
w=ONE/u; v=w*w;
EMULV(w,u,t1,t2,t3,t4,t5,t6,t7)
yy=w*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
ww=w*((ONE-t1)-t2);
ESUB(HPI,w,t3,cor)
yy=((HPI1+cor)-ww)-yy;
if ((y=t3+(yy-U4)) == t3+(yy+U4)) return __signArctan(x,y);
DIV2(ONE,ZERO,u,ZERO,w,ww,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
MUL2(w,ww,w,ww,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(w,ww,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(w,ww,s2,ss2,s1,ss1,t1,t2)
SUB2(HPI,HPI1,s1,ss1,s2,ss2,t1,t2)
if ((y=s2+(ss2-U8)) == s2+(ss2+U8)) return __signArctan(x,y);
return atanMp(x,pr);
}
else {
/* u >= E */
if (x>0) return HPI;
else return MHPI; }
}
}
}
/* Fix the sign of y and return */
double __signArctan(double x,double y){
if (x<ZERO) return -y;
else return y;
}
/* Final stages. Compute atan(x) by multiple precision arithmetic */
static double atanMp(double x,const int pr[]){
mp_no mpx,mpy,mpy2,mperr,mpt1,mpy1;
double y1,y2;
int i,p;
for (i=0; i<M; i++) {
p = pr[i];
__dbl_mp(x,&mpx,p); __mpatan(&mpx,&mpy,p);
__dbl_mp(u9[i].d,&mpt1,p); __mul(&mpy,&mpt1,&mperr,p);
__add(&mpy,&mperr,&mpy1,p); __sub(&mpy,&mperr,&mpy2,p);
__mp_dbl(&mpy1,&y1,p); __mp_dbl(&mpy2,&y2,p);
if (y1==y2) return y1;
}
return y1; /*if unpossible to do exact computing */
}
#ifdef NO_LONG_DOUBLE
weak_alias (atan, atanl)
#endif

View file

@ -1,85 +0,0 @@
/* @(#)s_floor.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $";
#endif
/*
* floor(x)
* Return x rounded toward -inf to integral value
* Method:
* Bit twiddling.
* Exception:
* Inexact flag raised if x not equal to floor(x).
*/
#include "math_private.h"
#ifdef __STDC__
static const double huge = 1.0e300;
#else
static double huge = 1.0e300;
#endif
#ifdef __STDC__
double __floor(double x)
#else
double __floor(x)
double x;
#endif
{
int32_t i0,i1,j0;
uint32_t i,j;
EXTRACT_WORDS(i0,i1,x);
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
if(j0<0) { /* raise inexact if x != 0 */
if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
if(i0>=0) {i0=i1=0;}
else if(((i0&0x7fffffff)|i1)!=0)
{ i0=0xbff00000;i1=0;}
}
} else {
i = (0x000fffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(i0<0) i0 += (0x00100000)>>j0;
i0 &= (~i); i1=0;
}
}
} else if (j0>51) {
if(j0==0x400) return x+x; /* inf or NaN */
else return x; /* x is integral */
} else {
i = ((uint32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(i0<0) {
if(j0==20) i0+=1;
else {
j = i1+(1<<(52-j0));
if(j<i1) i0 +=1 ; /* got a carry */
i1=j;
}
}
i1 &= (~i);
}
}
INSERT_WORDS(x,i0,i1);
return x;
}
weak_alias (__floor, floor)
#ifdef NO_LONG_DOUBLE
strong_alias (__floor, __floorl)
weak_alias (__floor, floorl)
#endif

View file

@ -1,32 +0,0 @@
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Changed to return -1 for -Inf by Ulrich Drepper <drepper@cygnus.com>.
* Public domain.
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: s_isinf.c,v 1.3 1995/05/11 23:20:14 jtc Exp $";
#endif
/*
* isinf(x) returns 1 is x is inf, -1 if x is -inf, else 0;
* no branching!
*/
#include "math_private.h"
int
__isinf (double x)
{
int32_t hx,lx;
EXTRACT_WORDS(hx,lx,x);
lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
lx |= -lx;
return ~(lx >> 31) & (hx >> 30);
}
hidden_def (__isinf)
weak_alias (__isinf, isinf)
#ifdef NO_LONG_DOUBLE
strong_alias (__isinf, __isinfl)
weak_alias (__isinf, isinfl)
#endif

View file

@ -1,69 +0,0 @@
/* @(#)s_scalbn.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $";
#endif
/*
* scalbn (double x, int n)
* scalbn(x,n) returns x* 2**n computed by exponent
* manipulation rather than by actually performing an
* exponentiation or a multiplication.
*/
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
huge = 1.0e+300,
tiny = 1.0e-300;
#ifdef __STDC__
double __scalbn (double x, int n)
#else
double __scalbn (x,n)
double x; int n;
#endif
{
int32_t k,hx,lx;
EXTRACT_WORDS(hx,lx,x);
k = (hx&0x7ff00000)>>20; /* extract exponent */
if (k==0) { /* 0 or subnormal x */
if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */
x *= two54;
GET_HIGH_WORD(hx,x);
k = ((hx&0x7ff00000)>>20) - 54;
}
if (k==0x7ff) return x+x; /* NaN or Inf */
k = k+n;
if (n> 50000 || k > 0x7fe)
return huge*__builtin_copysign(huge,x); /* overflow */
if (n< -50000) return tiny*__builtin_copysign(tiny,x); /*underflow*/
if (k > 0) /* normal result */
{SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;}
if (k <= -54)
return tiny*__builtin_copysign(tiny,x); /*underflow*/
k += 54; /* subnormal result */
SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
return x*twom54;
}
weak_alias (__scalbn, scalbn)
#ifdef NO_LONG_DOUBLE
strong_alias (__scalbn, __scalbnl)
weak_alias (__scalbn, scalbnl)
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,485 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*********************************************************************/
/* MODULE_NAME: utan.c */
/* */
/* FUNCTIONS: utan */
/* tanMp */
/* */
/* FILES NEEDED:dla.h endian.h mpa.h mydefs.h utan.h */
/* branred.c sincos32.c mptan.c */
/* utan.tbl */
/* */
/* An ultimate tan routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of tan(x). */
/* Assumption: Machine arithmetic operations are performed in */
/* round to nearest mode of IEEE 754 standard. */
/* */
/*********************************************************************/
#include "endian.h"
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
static double tanMp(double);
void __mptan(double, mp_no *, int);
double tan(double x) {
#include "utan.h"
#include "utan.tbl"
int ux,i,n;
double a,da,a2,b,db,c,dc,c1,cc1,c2,cc2,c3,cc3,fi,ffi,gi,pz,s,sy,
t,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,w,x2,xn,xx2,y,ya,yya,z0,z,zz,z2,zz2;
int p;
number num,v;
mp_no mpa,mpt1,mpt2;
#if 0
mp_no mpy;
#endif
int __branred(double, double *, double *);
int __mpranred(double, mp_no *, int);
/* x=+-INF, x=NaN */
num.d = x; ux = num.i[HIGH_HALF];
if ((ux&0x7ff00000)==0x7ff00000) return x-x;
w=(x<ZERO) ? -x : x;
/* (I) The case abs(x) <= 1.259e-8 */
if (w<=g1.d) return x;
/* (II) The case 1.259e-8 < abs(x) <= 0.0608 */
if (w<=g2.d) {
/* First stage */
x2 = x*x;
t2 = x*x2*(d3.d+x2*(d5.d+x2*(d7.d+x2*(d9.d+x2*d11.d))));
if ((y=x+(t2-u1.d*t2)) == x+(t2+u1.d*t2)) return y;
/* Second stage */
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
x2*a27.d))))));
EMULV(x,x,x2,xx2,t1,t2,t3,t4,t5)
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a9.d ,aa9.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a7.d ,aa7.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a5.d ,aa5.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d ,aa3.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(x ,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(x ,zero.d,c2,cc2,c1,cc1,t1,t2)
if ((y=c1+(cc1-u2.d*c1)) == c1+(cc1+u2.d*c1)) return y;
return tanMp(x);
}
/* (III) The case 0.0608 < abs(x) <= 0.787 */
if (w<=g3.d) {
/* First stage */
i = ((int) (mfftnhf.d+TWO8*w));
z = w-xfg[i][0].d; z2 = z*z; s = (x<ZERO) ? MONE : ONE;
pz = z+z*z2*(e0.d+z2*e1.d);
fi = xfg[i][1].d; gi = xfg[i][2].d; t2 = pz*(gi+fi)/(gi-pz);
if ((y=fi+(t2-fi*u3.d))==fi+(t2+fi*u3.d)) return (s*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=fi+(t2-(t4=fi*ua3.d+t3*ub3.d)))==fi+(t2+t4)) return (s*y);
/* Second stage */
ffi = xfg[i][3].d;
c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
EMULV(z,z,z2,zz2,t1,t2,t3,t4,t5)
ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(z ,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(z ,zero.d,c2,cc2,c1,cc1,t1,t2)
ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u4.d*c3))==c3+(cc3+u4.d*c3)) return (s*y);
return tanMp(x);
}
/* (---) The case 0.787 < abs(x) <= 25 */
if (w<=g4.d) {
/* Range reduction by algorithm i */
t = (x*hpinv.d + toint.d);
xn = t - toint.d;
v.d = t;
t1 = (x - xn*mp1.d) - xn*mp2.d;
n =v.i[LOW_HALF] & 0x00000001;
da = xn*mp3.d;
a=t1-da;
da = (t1-a)-da;
if (a<ZERO) {ya=-a; yya=-da; sy=MONE;}
else {ya= a; yya= da; sy= ONE;}
/* (IV),(V) The case 0.787 < abs(x) <= 25, abs(y) <= 1e-7 */
if (ya<=gy1.d) return tanMp(x);
/* (VI) The case 0.787 < abs(x) <= 25, 1e-7 < abs(y) <= 0.0608 */
if (ya<=gy2.d) {
a2 = a*a;
t2 = da+a*a2*(d3.d+a2*(d5.d+a2*(d7.d+a2*(d9.d+a2*d11.d))));
if (n) {
/* First stage -cot */
EADD(a,t2,b,db)
DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) return (-y); }
else {
/* First stage tan */
if ((y=a+(t2-u5.d*a))==a+(t2+u5.d*a)) return y; }
/* Second stage */
/* Range reduction by algorithm ii */
t = (x*hpinv.d + toint.d);
xn = t - toint.d;
v.d = t;
t1 = (x - xn*mp1.d) - xn*mp2.d;
n =v.i[LOW_HALF] & 0x00000001;
da = xn*pp3.d;
t=t1-da;
da = (t1-t)-da;
t1 = xn*pp4.d;
a = t - t1;
da = ((t-a)-t1)+da;
/* Second stage */
EADD(a,da,t1,t2) a=t1; da=t2;
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a9.d ,aa9.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a7.d ,aa7.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a5.d ,aa5.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d ,aa3.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(a ,da ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a ,da ,c2,cc2,c1,cc1,t1,t2)
if (n) {
/* Second stage -cot */
DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) return (-y); }
else {
/* Second stage tan */
if ((y=c1+(cc1-u7.d*c1)) == c1+(cc1+u7.d*c1)) return y; }
return tanMp(x);
}
/* (VII) The case 0.787 < abs(x) <= 25, 0.0608 < abs(y) <= 0.787 */
/* First stage */
i = ((int) (mfftnhf.d+TWO8*ya));
z = (z0=(ya-xfg[i][0].d))+yya; z2 = z*z;
pz = z+z*z2*(e0.d+z2*e1.d);
fi = xfg[i][1].d; gi = xfg[i][2].d;
if (n) {
/* -cot */
t2 = pz*(fi+gi)/(fi+pz);
if ((y=gi-(t2-gi*u10.d))==gi-(t2+gi*u10.d)) return (-sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=gi-(t2-(t4=gi*ua10.d+t3*ub10.d)))==gi-(t2+t4)) return (-sy*y); }
else {
/* tan */
t2 = pz*(gi+fi)/(gi-pz);
if ((y=fi+(t2-fi*u9.d))==fi+(t2+fi*u9.d)) return (sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=fi+(t2-(t4=fi*ua9.d+t3*ub9.d)))==fi+(t2+t4)) return (sy*y); }
/* Second stage */
ffi = xfg[i][3].d;
EADD(z0,yya,z,zz)
MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(z ,zz ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(z ,zz ,c2,cc2,c1,cc1,t1,t2)
ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
if (n) {
/* -cot */
DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u12.d*c3))==c3+(cc3+u12.d*c3)) return (-sy*y); }
else {
/* tan */
DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u11.d*c3))==c3+(cc3+u11.d*c3)) return (sy*y); }
return tanMp(x);
}
/* (---) The case 25 < abs(x) <= 1e8 */
if (w<=g5.d) {
/* Range reduction by algorithm ii */
t = (x*hpinv.d + toint.d);
xn = t - toint.d;
v.d = t;
t1 = (x - xn*mp1.d) - xn*mp2.d;
n =v.i[LOW_HALF] & 0x00000001;
da = xn*pp3.d;
t=t1-da;
da = (t1-t)-da;
t1 = xn*pp4.d;
a = t - t1;
da = ((t-a)-t1)+da;
EADD(a,da,t1,t2) a=t1; da=t2;
if (a<ZERO) {ya=-a; yya=-da; sy=MONE;}
else {ya= a; yya= da; sy= ONE;}
/* (+++) The case 25 < abs(x) <= 1e8, abs(y) <= 1e-7 */
if (ya<=gy1.d) return tanMp(x);
/* (VIII) The case 25 < abs(x) <= 1e8, 1e-7 < abs(y) <= 0.0608 */
if (ya<=gy2.d) {
a2 = a*a;
t2 = da+a*a2*(d3.d+a2*(d5.d+a2*(d7.d+a2*(d9.d+a2*d11.d))));
if (n) {
/* First stage -cot */
EADD(a,t2,b,db)
DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) return (-y); }
else {
/* First stage tan */
if ((y=a+(t2-u13.d*a))==a+(t2+u13.d*a)) return y; }
/* Second stage */
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a9.d ,aa9.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a7.d ,aa7.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a5.d ,aa5.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d ,aa3.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(a ,da ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a ,da ,c2,cc2,c1,cc1,t1,t2)
if (n) {
/* Second stage -cot */
DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) return (-y); }
else {
/* Second stage tan */
if ((y=c1+(cc1-u15.d*c1)) == c1+(cc1+u15.d*c1)) return (y); }
return tanMp(x);
}
/* (IX) The case 25 < abs(x) <= 1e8, 0.0608 < abs(y) <= 0.787 */
/* First stage */
i = ((int) (mfftnhf.d+TWO8*ya));
z = (z0=(ya-xfg[i][0].d))+yya; z2 = z*z;
pz = z+z*z2*(e0.d+z2*e1.d);
fi = xfg[i][1].d; gi = xfg[i][2].d;
if (n) {
/* -cot */
t2 = pz*(fi+gi)/(fi+pz);
if ((y=gi-(t2-gi*u18.d))==gi-(t2+gi*u18.d)) return (-sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=gi-(t2-(t4=gi*ua18.d+t3*ub18.d)))==gi-(t2+t4)) return (-sy*y); }
else {
/* tan */
t2 = pz*(gi+fi)/(gi-pz);
if ((y=fi+(t2-fi*u17.d))==fi+(t2+fi*u17.d)) return (sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=fi+(t2-(t4=fi*ua17.d+t3*ub17.d)))==fi+(t2+t4)) return (sy*y); }
/* Second stage */
ffi = xfg[i][3].d;
EADD(z0,yya,z,zz)
MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(z ,zz ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(z ,zz ,c2,cc2,c1,cc1,t1,t2)
ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
if (n) {
/* -cot */
DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u20.d*c3))==c3+(cc3+u20.d*c3)) return (-sy*y); }
else {
/* tan */
DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u19.d*c3))==c3+(cc3+u19.d*c3)) return (sy*y); }
return tanMp(x);
}
/* (---) The case 1e8 < abs(x) < 2**1024 */
/* Range reduction by algorithm iii */
n = (__branred(x,&a,&da)) & 0x00000001;
EADD(a,da,t1,t2) a=t1; da=t2;
if (a<ZERO) {ya=-a; yya=-da; sy=MONE;}
else {ya= a; yya= da; sy= ONE;}
/* (+++) The case 1e8 < abs(x) < 2**1024, abs(y) <= 1e-7 */
if (ya<=gy1.d) return tanMp(x);
/* (X) The case 1e8 < abs(x) < 2**1024, 1e-7 < abs(y) <= 0.0608 */
if (ya<=gy2.d) {
a2 = a*a;
t2 = da+a*a2*(d3.d+a2*(d5.d+a2*(d7.d+a2*(d9.d+a2*d11.d))));
if (n) {
/* First stage -cot */
EADD(a,t2,b,db)
DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c+(dc-u22.d*c))==c+(dc+u22.d*c)) return (-y); }
else {
/* First stage tan */
if ((y=a+(t2-u21.d*a))==a+(t2+u21.d*a)) return y; }
/* Second stage */
/* Reduction by algorithm iv */
p=10; n = (__mpranred(x,&mpa,p)) & 0x00000001;
__mp_dbl(&mpa,&a,p); __dbl_mp(a,&mpt1,p);
__sub(&mpa,&mpt1,&mpt2,p); __mp_dbl(&mpt2,&da,p);
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a9.d ,aa9.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a7.d ,aa7.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a5.d ,aa5.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d ,aa3.d ,c1,cc1,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(a ,da ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a ,da ,c2,cc2,c1,cc1,t1,t2)
if (n) {
/* Second stage -cot */
DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c2+(cc2-u24.d*c2)) == c2+(cc2+u24.d*c2)) return (-y); }
else {
/* Second stage tan */
if ((y=c1+(cc1-u23.d*c1)) == c1+(cc1+u23.d*c1)) return y; }
return tanMp(x);
}
/* (XI) The case 1e8 < abs(x) < 2**1024, 0.0608 < abs(y) <= 0.787 */
/* First stage */
i = ((int) (mfftnhf.d+TWO8*ya));
z = (z0=(ya-xfg[i][0].d))+yya; z2 = z*z;
pz = z+z*z2*(e0.d+z2*e1.d);
fi = xfg[i][1].d; gi = xfg[i][2].d;
if (n) {
/* -cot */
t2 = pz*(fi+gi)/(fi+pz);
if ((y=gi-(t2-gi*u26.d))==gi-(t2+gi*u26.d)) return (-sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=gi-(t2-(t4=gi*ua26.d+t3*ub26.d)))==gi-(t2+t4)) return (-sy*y); }
else {
/* tan */
t2 = pz*(gi+fi)/(gi-pz);
if ((y=fi+(t2-fi*u25.d))==fi+(t2+fi*u25.d)) return (sy*y);
t3 = (t2<ZERO) ? -t2 : t2;
if ((y=fi+(t2-(t4=fi*ua25.d+t3*ub25.d)))==fi+(t2+t4)) return (sy*y); }
/* Second stage */
ffi = xfg[i][3].d;
EADD(z0,yya,z,zz)
MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
MUL2(z ,zz ,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(z ,zz ,c2,cc2,c1,cc1,t1,t2)
ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
if (n) {
/* -cot */
DIV2(c1,cc1,c2,cc2,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u28.d*c3))==c3+(cc3+u28.d*c3)) return (-sy*y); }
else {
/* tan */
DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
if ((y=c3+(cc3-u27.d*c3))==c3+(cc3+u27.d*c3)) return (sy*y); }
return tanMp(x);
}
/* multiple precision stage */
/* Convert x to multi precision number,compute tan(x) by mptan() routine */
/* and converts result back to double */
static double tanMp(double x)
{
int p;
double y;
mp_no mpy;
p=32;
__mptan(x, &mpy, p);
__mp_dbl(&mpy,&y,p);
return y;
}
#ifdef NO_LONG_DOUBLE
weak_alias (tan, tanl)
#endif

View file

@ -1,912 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************/
/* TABLES FOR THE usin() and ucos() FUNCTION */
/****************************************************************/
#ifdef BIG_ENDI
static const union {int4 i[880]; double x[40];}sincos = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x3FF00000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x3F7FFFEA, 0xAAAEEEEF,
/**/ 0xBC1E45E2, 0xEC67B77C,
/**/ 0x3FEFFFC0, 0x00155552,
/**/ 0x3C8F4A01, 0xA0196DAE,
/**/ 0x3F8FFFAA, 0xAAEEEED5,
/**/ 0xBC02AB63, 0x9A9F0777,
/**/ 0x3FEFFF00, 0x0155549F,
/**/ 0x3C828A28, 0xA03A5EF3,
/**/ 0x3F97FF70, 0x01033255,
/**/ 0x3BFEFE2B, 0x51527336,
/**/ 0x3FEFFDC0, 0x06BFF7E6,
/**/ 0x3C8AE6DA, 0xE86977BD,
/**/ 0x3F9FFEAA, 0xAEEEE86F,
/**/ 0xBC3CD406, 0xFB224AE2,
/**/ 0x3FEFFC00, 0x155527D3,
/**/ 0xBC83B544, 0x92D89B5B,
/**/ 0x3FA3FEB2, 0xB12D45D5,
/**/ 0x3C34EC54, 0x203D1C11,
/**/ 0x3FEFF9C0, 0x3414A7BA,
/**/ 0x3C6991F4, 0xBE6C59BF,
/**/ 0x3FA7FDC0, 0x1032FBA9,
/**/ 0xBC4599BD, 0xF46E997A,
/**/ 0x3FEFF700, 0x6BFDF99F,
/**/ 0xBC78B3B5, 0x60648D5F,
/**/ 0x3FABFC6D, 0x78586DAC,
/**/ 0x3C18E4FD, 0x03DBF236,
/**/ 0x3FEFF3C0, 0xC8103A31,
/**/ 0x3C74856D, 0xBDDC0E66,
/**/ 0x3FAFFAAA, 0xEEED4EDB,
/**/ 0xBC42D16D, 0x32684B69,
/**/ 0x3FEFF001, 0x5549F4D3,
/**/ 0x3C832838, 0x7B99426F,
/**/ 0x3FB1FC34, 0x3D808BEF,
/**/ 0xBC5F3D32, 0xE6F3BE4F,
/**/ 0x3FEFEBC2, 0x22A8EF9F,
/**/ 0x3C579349, 0x34F54C77,
/**/ 0x3FB3FACB, 0x12D1755B,
/**/ 0xBC592191, 0x5299468C,
/**/ 0x3FEFE703, 0x4129EF6F,
/**/ 0xBC6CBF43, 0x37C96F97,
/**/ 0x3FB5F911, 0xFD10B737,
/**/ 0xBC50184F, 0x02BE9102,
/**/ 0x3FEFE1C4, 0xC3C873EB,
/**/ 0xBC35A9C9, 0x057C4A02,
/**/ 0x3FB7F701, 0x032550E4,
/**/ 0x3C3AFC2D, 0x1800501A,
/**/ 0x3FEFDC06, 0xBF7E6B9B,
/**/ 0x3C831902, 0xB535F8DB,
/**/ 0x3FB9F490, 0x2D55D1F9,
/**/ 0x3C52696D, 0x7EAC1DC1,
/**/ 0x3FEFD5C9, 0x4B43E000,
/**/ 0xBC62E768, 0xCB4F92F9,
/**/ 0x3FBBF1B7, 0x8568391D,
/**/ 0x3C5E9184, 0x1DEA4CC8,
/**/ 0x3FEFCF0C, 0x800E99B1,
/**/ 0x3C6EA3D7, 0x86D186AC,
/**/ 0x3FBDEE6F, 0x16C1CCE6,
/**/ 0xBC450F8E, 0x2FB71673,
/**/ 0x3FEFC7D0, 0x78D1BC88,
/**/ 0x3C8075D2, 0x447DB685,
/**/ 0x3FBFEAAE, 0xEE86EE36,
/**/ 0xBC4AFCB2, 0xBCC6F03B,
/**/ 0x3FEFC015, 0x527D5BD3,
/**/ 0x3C8B68F3, 0x5094EFB8,
/**/ 0x3FC0F337, 0x8DDD71D1,
/**/ 0x3C6D8468, 0x724F0F9E,
/**/ 0x3FEFB7DB, 0x2BFE0695,
/**/ 0x3C821DAD, 0xF4F65AB1,
/**/ 0x3FC1F0D3, 0xD7AFCEAF,
/**/ 0xBC66EF95, 0x099769A5,
/**/ 0x3FEFAF22, 0x263C4BD3,
/**/ 0xBC552ACE, 0x133A2769,
/**/ 0x3FC2EE28, 0x5E4AB88F,
/**/ 0xBC6E4D0F, 0x05DEE058,
/**/ 0x3FEFA5EA, 0x641C36F2,
/**/ 0x3C404DA6, 0xED17CC7C,
/**/ 0x3FC3EB31, 0x2C5D66CB,
/**/ 0x3C647D66, 0x6B66CB91,
/**/ 0x3FEF9C34, 0x0A7CC428,
/**/ 0x3C8C5B6B, 0x063B7462,
/**/ 0x3FC4E7EA, 0x4DC5F27B,
/**/ 0x3C5949DB, 0x2AC072FC,
/**/ 0x3FEF91FF, 0x40374D01,
/**/ 0xBC67D03F, 0x4D3A9E4C,
/**/ 0x3FC5E44F, 0xCFA126F3,
/**/ 0xBC66F443, 0x063F89B6,
/**/ 0x3FEF874C, 0x2E1EECF6,
/**/ 0xBC8C6514, 0xE1332B16,
/**/ 0x3FC6E05D, 0xC05A4D4C,
/**/ 0xBBD32C5C, 0x8B81C940,
/**/ 0x3FEF7C1A, 0xFEFFDE24,
/**/ 0xBC78F55B, 0xC47540B1,
/**/ 0x3FC7DC10, 0x2FBAF2B5,
/**/ 0x3C45AB50, 0xE23C97C3,
/**/ 0x3FEF706B, 0xDF9ECE1C,
/**/ 0xBC8698C8, 0x0C36DCB4,
/**/ 0x3FC8D763, 0x2EFAA944,
/**/ 0xBC620FA2, 0x62CBB953,
/**/ 0x3FEF643E, 0xFEB82ACD,
/**/ 0x3C76B00A, 0xC1FE28AC,
/**/ 0x3FC9D252, 0xD0CEC312,
/**/ 0x3C59C43D, 0x80B1137D,
/**/ 0x3FEF5794, 0x8CFF6797,
/**/ 0x3C6E3A0D, 0x3E03B1D5,
/**/ 0x3FCACCDB, 0x297A0765,
/**/ 0xBC59883B, 0x57D6CDEB,
/**/ 0x3FEF4A6C, 0xBD1E3A79,
/**/ 0x3C813DF0, 0xEDAEBB57,
/**/ 0x3FCBC6F8, 0x4EDC6199,
/**/ 0x3C69C1A5, 0x6A7B0CAB,
/**/ 0x3FEF3CC7, 0xC3B3D16E,
/**/ 0xBC621A3A, 0xD28A3494,
/**/ 0x3FCCC0A6, 0x588289A3,
/**/ 0xBC6868D0, 0x9BC87C6B,
/**/ 0x3FEF2EA5, 0xD753FFED,
/**/ 0x3C8CC421, 0x5F56D583,
/**/ 0x3FCDB9E1, 0x5FB5A5D0,
/**/ 0xBC632E20, 0xD6CC6FC2,
/**/ 0x3FEF2007, 0x3086649F,
/**/ 0x3C7B9404, 0x16C1984B,
/**/ 0x3FCEB2A5, 0x7F8AE5A3,
/**/ 0xBC60BE06, 0xAF572CEB,
/**/ 0x3FEF10EC, 0x09C5873B,
/**/ 0x3C8D9072, 0x762C1283,
/**/ 0x3FCFAAEE, 0xD4F31577,
/**/ 0xBC615D88, 0x508E32B8,
/**/ 0x3FEF0154, 0x9F7DEEA1,
/**/ 0x3C8D3C1E, 0x99E5CAFD,
/**/ 0x3FD0515C, 0xBF65155C,
/**/ 0xBC79B8C2, 0x9DFD8EC8,
/**/ 0x3FEEF141, 0x300D2F26,
/**/ 0xBC82AA1B, 0x08DED372,
/**/ 0x3FD0CD00, 0xCEF36436,
/**/ 0xBC79FB0A, 0x0C93E2B5,
/**/ 0x3FEEE0B1, 0xFBC0F11C,
/**/ 0xBC4BFD23, 0x80BBC3B1,
/**/ 0x3FD14861, 0xAA94DDEB,
/**/ 0xBC6BE881, 0xB5B615A4,
/**/ 0x3FEECFA7, 0x44D5EFA1,
/**/ 0xBC556D0A, 0x4AF541D0,
/**/ 0x3FD1C37D, 0x64C6B876,
/**/ 0x3C746076, 0xFE0DCFF5,
/**/ 0x3FEEBE21, 0x4F76EFA8,
/**/ 0xBC802F9F, 0x12BA543E,
/**/ 0x3FD23E52, 0x111AAF36,
/**/ 0xBC74F080, 0x334EFF18,
/**/ 0x3FEEAC20, 0x61BBAF4F,
/**/ 0x3C62C1D5, 0x3E94658D,
/**/ 0x3FD2B8DD, 0xC43EB49F,
/**/ 0x3C615538, 0x99F2D807,
/**/ 0x3FEE99A4, 0xC3A7CD83,
/**/ 0xBC82264B, 0x1BC53CE8,
/**/ 0x3FD3331E, 0x94049F87,
/**/ 0x3C7E0CB6, 0xB40C302C,
/**/ 0x3FEE86AE, 0xBF29A9ED,
/**/ 0x3C89397A, 0xFDBB58A7,
/**/ 0x3FD3AD12, 0x9769D3D8,
/**/ 0x3C003D55, 0x04878398,
/**/ 0x3FEE733E, 0xA0193D40,
/**/ 0xBC86428B, 0x3546CE13,
/**/ 0x3FD426B7, 0xE69EE697,
/**/ 0xBC7F09C7, 0x5705C59F,
/**/ 0x3FEE5F54, 0xB436E9D0,
/**/ 0x3C87EB0F, 0xD02FC8BC,
/**/ 0x3FD4A00C, 0x9B0F3D20,
/**/ 0x3C7823BA, 0x6BB08EAD,
/**/ 0x3FEE4AF1, 0x4B2A449C,
/**/ 0xBC868CA0, 0x2E8A6833,
/**/ 0x3FD5190E, 0xCF68A77A,
/**/ 0x3C7B3571, 0x55EEF0F3,
/**/ 0x3FEE3614, 0xB680D6A5,
/**/ 0xBC727793, 0xAA015237,
/**/ 0x3FD591BC, 0x9FA2F597,
/**/ 0x3C67C74B, 0xAC3FE0CB,
/**/ 0x3FEE20BF, 0x49ACD6C1,
/**/ 0xBC5660AE, 0xC7EF636C,
/**/ 0x3FD60A14, 0x29078775,
/**/ 0x3C5B1FD8, 0x0BA89133,
/**/ 0x3FEE0AF1, 0x5A03DBCE,
/**/ 0x3C5FE8E7, 0x02771AE6,
/**/ 0x3FD68213, 0x8A38D7F7,
/**/ 0xBC7D8892, 0x02444AAD,
/**/ 0x3FEDF4AB, 0x3EBD875E,
/**/ 0xBC8E2D8A, 0x7E6736C4,
/**/ 0x3FD6F9B8, 0xE33A0255,
/**/ 0x3C742BC1, 0x4EE9DA0D,
/**/ 0x3FEDDDED, 0x50F228D6,
/**/ 0xBC6E80C8, 0xD42BA2BF,
/**/ 0x3FD77102, 0x55764214,
/**/ 0xBC66EAD7, 0x314BB6CE,
/**/ 0x3FEDC6B7, 0xEB995912,
/**/ 0x3C54B364, 0x776DCD35,
/**/ 0x3FD7E7EE, 0x03C86D4E,
/**/ 0xBC7B63BC, 0xDABF5AF2,
/**/ 0x3FEDAF0B, 0x6B888E83,
/**/ 0x3C8A249E, 0x2B5E5CEA,
/**/ 0x3FD85E7A, 0x12826949,
/**/ 0x3C78A40E, 0x9B5FACE0,
/**/ 0x3FED96E8, 0x2F71A9DC,
/**/ 0x3C8FF61B, 0xD5D2039D,
/**/ 0x3FD8D4A4, 0xA774992F,
/**/ 0x3C744A02, 0xEA766326,
/**/ 0x3FED7E4E, 0x97E17B4A,
/**/ 0xBC63B770, 0x352BED94,
/**/ 0x3FD94A6B, 0xE9F546C5,
/**/ 0xBC769CE1, 0x3E683F58,
/**/ 0x3FED653F, 0x073E4040,
/**/ 0xBC876236, 0x434BEC37,
/**/ 0x3FD9BFCE, 0x02E80510,
/**/ 0x3C709E39, 0xA320B0A4,
/**/ 0x3FED4BB9, 0xE1C619E0,
/**/ 0x3C8F34BB, 0x77858F61,
/**/ 0x3FDA34C9, 0x1CC50CCA,
/**/ 0xBC5A310E, 0x3B50CECD,
/**/ 0x3FED31BF, 0x8D8D7C06,
/**/ 0x3C7E60DD, 0x3089CBDD,
/**/ 0x3FDAA95B, 0x63A09277,
/**/ 0xBC66293E, 0xB13C0381,
/**/ 0x3FED1750, 0x727D94F0,
/**/ 0x3C80D52B, 0x1EC1A48E,
/**/ 0x3FDB1D83, 0x05321617,
/**/ 0xBC7AE242, 0xCB99F519,
/**/ 0x3FECFC6C, 0xFA52AD9F,
/**/ 0x3C88B5B5, 0x508F2A0D,
/**/ 0x3FDB913E, 0x30DBAC43,
/**/ 0xBC7E38AD, 0x2F6C3FF1,
/**/ 0x3FECE115, 0x909A82E5,
/**/ 0x3C81F139, 0xBB31109A,
/**/ 0x3FDC048B, 0x17B140A3,
/**/ 0x3C619FE6, 0x757E9FA7,
/**/ 0x3FECC54A, 0xA2B2972E,
/**/ 0x3C64EE16, 0x2BA83A98,
/**/ 0x3FDC7767, 0xEC7FD19E,
/**/ 0xBC5EB14D, 0x1A3D5826,
/**/ 0x3FECA90C, 0x9FC67D0B,
/**/ 0xBC646A81, 0x485E3462,
/**/ 0x3FDCE9D2, 0xE3D4A51F,
/**/ 0xBC62FC8A, 0x12DAE298,
/**/ 0x3FEC8C5B, 0xF8CE1A84,
/**/ 0x3C7AB3D1, 0xA1590123,
/**/ 0x3FDD5BCA, 0x34047661,
/**/ 0x3C728A44, 0xA75FC29C,
/**/ 0x3FEC6F39, 0x208BE53B,
/**/ 0xBC8741DB, 0xFBAADB42,
/**/ 0x3FDDCD4C, 0x15329C9A,
/**/ 0x3C70D4C6, 0xE171FD9A,
/**/ 0x3FEC51A4, 0x8B8B175E,
/**/ 0xBC61BBB4, 0x3B9AA880,
/**/ 0x3FDE3E56, 0xC1582A69,
/**/ 0xBC50A482, 0x1099F88F,
/**/ 0x3FEC339E, 0xB01DDD81,
/**/ 0xBC8CAAF5, 0xEE82C5C0,
/**/ 0x3FDEAEE8, 0x744B05F0,
/**/ 0xBC5789B4, 0x3C9B027D,
/**/ 0x3FEC1528, 0x065B7D50,
/**/ 0xBC889211, 0x1312E828,
/**/ 0x3FDF1EFF, 0x6BC4F97B,
/**/ 0x3C717212, 0xF8A7525C,
/**/ 0x3FEBF641, 0x081E7536,
/**/ 0x3C8B7BD7, 0x1628A9A1,
/**/ 0x3FDF8E99, 0xE76ABC97,
/**/ 0x3C59D950, 0xAF2D00A3,
/**/ 0x3FEBD6EA, 0x310294F5,
/**/ 0x3C731BBC, 0xC88C109D,
/**/ 0x3FDFFDB6, 0x28D2F57A,
/**/ 0x3C6F4A99, 0x2E905B6A,
/**/ 0x3FEBB723, 0xFE630F32,
/**/ 0x3C772BD2, 0x452D0A39,
/**/ 0x3FE03629, 0x39C69955,
/**/ 0xBC82D8CD, 0x78397B01,
/**/ 0x3FEB96EE, 0xEF58840E,
/**/ 0x3C545A3C, 0xC78FADE0,
/**/ 0x3FE06D36, 0x86946E5B,
/**/ 0x3C83F5AE, 0x4538FF1B,
/**/ 0x3FEB764B, 0x84B704C2,
/**/ 0xBC8F5848, 0xC21B389B,
/**/ 0x3FE0A402, 0x1E9E1001,
/**/ 0xBC86F643, 0xA13914F6,
/**/ 0x3FEB553A, 0x410C104E,
/**/ 0x3C58FF79, 0x47027A16,
/**/ 0x3FE0DA8B, 0x26B5672E,
/**/ 0xBC8A58DE, 0xF0BEE909,
/**/ 0x3FEB33BB, 0xA89C8948,
/**/ 0x3C8EA6A5, 0x1D1F6CA9,
/**/ 0x3FE110D0, 0xC4B69C3B,
/**/ 0x3C8D9189, 0x98809981,
/**/ 0x3FEB11D0, 0x4162A4C6,
/**/ 0x3C71DD56, 0x1EFBC0C2,
/**/ 0x3FE146D2, 0x1F8B7F82,
/**/ 0x3C7BF953, 0x5E2739A8,
/**/ 0x3FEAEF78, 0x930BD275,
/**/ 0xBC7F8362, 0x79746F94,
/**/ 0x3FE17C8E, 0x5F2EEDB0,
/**/ 0x3C635E57, 0x102E2488,
/**/ 0x3FEACCB5, 0x26F69DE5,
/**/ 0x3C88FB6A, 0x8DD6B6CC,
/**/ 0x3FE1B204, 0xACB02FDD,
/**/ 0xBC5F190C, 0x70CBB5FF,
/**/ 0x3FEAA986, 0x88308913,
/**/ 0xBC0B83D6, 0x07CD5070,
/**/ 0x3FE1E734, 0x3236574C,
/**/ 0x3C722A3F, 0xA4F41D5A,
/**/ 0x3FEA85ED, 0x4373E02D,
/**/ 0x3C69BE06, 0x385EC792,
/**/ 0x3FE21C1C, 0x1B0394CF,
/**/ 0x3C5E5B32, 0x4B23AA31,
/**/ 0x3FEA61E9, 0xE72586AF,
/**/ 0x3C858330, 0xE2FD453F,
/**/ 0x3FE250BB, 0x93788BBB,
/**/ 0x3C7EA3D0, 0x2457BCCE,
/**/ 0x3FEA3D7D, 0x0352BDCF,
/**/ 0xBC868DBA, 0xECA19669,
/**/ 0x3FE28511, 0xC917A067,
/**/ 0xBC801DF1, 0xD9A16B70,
/**/ 0x3FEA18A7, 0x29AEE445,
/**/ 0x3C395E25, 0x736C0358,
/**/ 0x3FE2B91D, 0xEA88421E,
/**/ 0xBC8FA371, 0xDB216AB0,
/**/ 0x3FE9F368, 0xED912F85,
/**/ 0xBC81D200, 0xC5791606,
/**/ 0x3FE2ECDF, 0x279A3082,
/**/ 0x3C8D3557, 0xE0E7E37E,
/**/ 0x3FE9CDC2, 0xE3F25E5C,
/**/ 0x3C83F991, 0x12993F62,
/**/ 0x3FE32054, 0xB148BC4F,
/**/ 0x3C8F6B42, 0x095A135B,
/**/ 0x3FE9A7B5, 0xA36A6514,
/**/ 0x3C8722CF, 0xCC9FA7A9,
/**/ 0x3FE3537D, 0xB9BE0367,
/**/ 0x3C6B327E, 0x7AF040F0,
/**/ 0x3FE98141, 0xC42E1310,
/**/ 0x3C8D1FF8, 0x0488F08D,
/**/ 0x3FE38659, 0x7456282B,
/**/ 0xBC710FAD, 0xA93B07A8,
/**/ 0x3FE95A67, 0xE00CB1FD,
/**/ 0xBC80BEFD, 0xA21F862D,
/**/ 0x3FE3B8E7, 0x15A2840A,
/**/ 0xBC797653, 0xA7D2F07B,
/**/ 0x3FE93328, 0x926D9E92,
/**/ 0xBC8BB770, 0x03600CDA,
/**/ 0x3FE3EB25, 0xD36CD53A,
/**/ 0xBC5BE570, 0xE1570FC0,
/**/ 0x3FE90B84, 0x784DDAF7,
/**/ 0xBC70FEB1, 0x0AB93B87,
/**/ 0x3FE41D14, 0xE4BA6790,
/**/ 0x3C84608F, 0xD287ECF5,
/**/ 0x3FE8E37C, 0x303D9AD1,
/**/ 0xBC6463A4, 0xB53D4BF8,
/**/ 0x3FE44EB3, 0x81CF386B,
/**/ 0xBC83ED6C, 0x1E6A5505,
/**/ 0x3FE8BB10, 0x5A5DC900,
/**/ 0x3C8863E0, 0x3E9474C1,
/**/ 0x3FE48000, 0xE431159F,
/**/ 0xBC8B194A, 0x7463ED10,
/**/ 0x3FE89241, 0x985D871F,
/**/ 0x3C8C48D9, 0xC413ED84,
/**/ 0x3FE4B0FC, 0x46AAB761,
/**/ 0x3C20DA05, 0x738CC59A,
/**/ 0x3FE86910, 0x8D77A6C6,
/**/ 0x3C7338FF, 0xE2BFE9DD,
/**/ 0x3FE4E1A4, 0xE54ED51B,
/**/ 0xBC8A492F, 0x89B7C76A,
/**/ 0x3FE83F7D, 0xDE701CA0,
/**/ 0xBC4152CF, 0x609BC6E8,
/**/ 0x3FE511F9, 0xFD7B351C,
/**/ 0xBC85C0E8, 0x61C48831,
/**/ 0x3FE8158A, 0x31916D5D,
/**/ 0xBC6DE8B9, 0x0B8228DE,
/**/ 0x3FE541FA, 0xCDDBB724,
/**/ 0x3C7232C2, 0x8520D391,
/**/ 0x3FE7EB36, 0x2EAA1488,
/**/ 0x3C5A1D65, 0xA4A5959F,
/**/ 0x3FE571A6, 0x966D59B3,
/**/ 0x3C5C843B, 0x4D0FB198,
/**/ 0x3FE7C082, 0x7F09E54F,
/**/ 0xBC6C73D6, 0xD72AEE68,
/**/ 0x3FE5A0FC, 0x98813A12,
/**/ 0xBC8D82E2, 0xB7D4227B,
/**/ 0x3FE7956F, 0xCD7F6543,
/**/ 0xBC8AB276, 0xE9D45AE4,
/**/ 0x3FE5CFFC, 0x16BF8F0D,
/**/ 0x3C896CB3, 0x70EB578A,
/**/ 0x3FE769FE, 0xC655211F,
/**/ 0xBC6827D5, 0xCF8C68C5,
/**/ 0x3FE5FEA4, 0x552A9E57,
/**/ 0x3C80B6CE, 0xF7EE20B7,
/**/ 0x3FE73E30, 0x174EFBA1,
/**/ 0xBC65D3AE, 0x3D94AD5F,
/**/ 0x3FE62CF4, 0x9921AC79,
/**/ 0xBC8EDD98, 0x55B6241A,
/**/ 0x3FE71204, 0x6FA77678,
/**/ 0x3C8425B0, 0xA5029C81,
/**/ 0x3FE65AEC, 0x2963E755,
/**/ 0x3C8126F9, 0x6B71053C,
/**/ 0x3FE6E57C, 0x800CF55E,
/**/ 0x3C860286, 0xDEDBD0A6,
/**/ 0x3FE6888A, 0x4E134B2F,
/**/ 0xBC86B7D3, 0x7644D5E6,
/**/ 0x3FE6B898, 0xFA9EFB5D,
/**/ 0x3C715AC7, 0x86CCF4B2,
/**/ 0x3FE6B5CE, 0x50B7821A,
/**/ 0xBC65D515, 0x8F702E0F,
/**/ 0x3FE68B5A, 0x92EB6253,
/**/ 0xBC89A91A, 0xD985F89C,
/**/ 0x3FE6E2B7, 0x7C40BDE1,
/**/ 0xBC70E729, 0x857FAD53,
/**/ 0x3FE65DC1, 0xFDEB8CBA,
/**/ 0xBC597C1B, 0x47337C77,
/**/ 0x3FE70F45, 0x1D0A8C40,
/**/ 0x3C697EDE, 0x3885770D,
/**/ 0x3FE62FCF, 0xF20191C7,
/**/ 0x3C6D9143, 0x895756EF,
/**/ 0x3FE73B76, 0x80DEA578,
/**/ 0xBC722483, 0x06DC12A2,
/**/ 0x3FE60185, 0x26F563DF,
/**/ 0x3C846CA5, 0xE0E432D0,
/**/ 0x3FE7674A, 0xF6F7B524,
/**/ 0x3C7E9D3F, 0x94AC84A8,
/**/ 0x3FE5D2E2, 0x55F1F17A,
/**/ 0x3C803141, 0x04C8892B,
/**/ 0x3FE792C1, 0xD0041D52,
/**/ 0xBC8ABF05, 0xEEB354EB,
/**/ 0x3FE5A3E8, 0x39824077,
/**/ 0x3C8428AA, 0x2759BE62,
/**/ 0x3FE7BDDA, 0x5E28B3C2,
/**/ 0x3C4AD119, 0x7CCD0393,
/**/ 0x3FE57497, 0x8D8E83F2,
/**/ 0x3C8F4714, 0xAF282D23,
/**/ 0x3FE7E893, 0xF5037959,
/**/ 0x3C80EEFB, 0xAA650C4C,
/**/ 0x3FE544F1, 0x0F592CA5,
/**/ 0xBC8E7AE8, 0xE6C7A62F,
/**/ 0x3FE812ED, 0xE9AE4BA4,
/**/ 0xBC87830A, 0xDF402DDA,
/**/ 0x3FE514F5, 0x7D7BF3DA,
/**/ 0x3C747A10, 0x8073C259 } };
#else
#ifdef LITTLE_ENDI
static const union {int4 i[880]; double x[440];} sincos = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x3FF00000,
/**/ 0x00000000, 0x00000000,
/**/ 0xAAAEEEEF, 0x3F7FFFEA,
/**/ 0xEC67B77C, 0xBC1E45E2,
/**/ 0x00155552, 0x3FEFFFC0,
/**/ 0xA0196DAE, 0x3C8F4A01,
/**/ 0xAAEEEED5, 0x3F8FFFAA,
/**/ 0x9A9F0777, 0xBC02AB63,
/**/ 0x0155549F, 0x3FEFFF00,
/**/ 0xA03A5EF3, 0x3C828A28,
/**/ 0x01033255, 0x3F97FF70,
/**/ 0x51527336, 0x3BFEFE2B,
/**/ 0x06BFF7E6, 0x3FEFFDC0,
/**/ 0xE86977BD, 0x3C8AE6DA,
/**/ 0xAEEEE86F, 0x3F9FFEAA,
/**/ 0xFB224AE2, 0xBC3CD406,
/**/ 0x155527D3, 0x3FEFFC00,
/**/ 0x92D89B5B, 0xBC83B544,
/**/ 0xB12D45D5, 0x3FA3FEB2,
/**/ 0x203D1C11, 0x3C34EC54,
/**/ 0x3414A7BA, 0x3FEFF9C0,
/**/ 0xBE6C59BF, 0x3C6991F4,
/**/ 0x1032FBA9, 0x3FA7FDC0,
/**/ 0xF46E997A, 0xBC4599BD,
/**/ 0x6BFDF99F, 0x3FEFF700,
/**/ 0x60648D5F, 0xBC78B3B5,
/**/ 0x78586DAC, 0x3FABFC6D,
/**/ 0x03DBF236, 0x3C18E4FD,
/**/ 0xC8103A31, 0x3FEFF3C0,
/**/ 0xBDDC0E66, 0x3C74856D,
/**/ 0xEEED4EDB, 0x3FAFFAAA,
/**/ 0x32684B69, 0xBC42D16D,
/**/ 0x5549F4D3, 0x3FEFF001,
/**/ 0x7B99426F, 0x3C832838,
/**/ 0x3D808BEF, 0x3FB1FC34,
/**/ 0xE6F3BE4F, 0xBC5F3D32,
/**/ 0x22A8EF9F, 0x3FEFEBC2,
/**/ 0x34F54C77, 0x3C579349,
/**/ 0x12D1755B, 0x3FB3FACB,
/**/ 0x5299468C, 0xBC592191,
/**/ 0x4129EF6F, 0x3FEFE703,
/**/ 0x37C96F97, 0xBC6CBF43,
/**/ 0xFD10B737, 0x3FB5F911,
/**/ 0x02BE9102, 0xBC50184F,
/**/ 0xC3C873EB, 0x3FEFE1C4,
/**/ 0x057C4A02, 0xBC35A9C9,
/**/ 0x032550E4, 0x3FB7F701,
/**/ 0x1800501A, 0x3C3AFC2D,
/**/ 0xBF7E6B9B, 0x3FEFDC06,
/**/ 0xB535F8DB, 0x3C831902,
/**/ 0x2D55D1F9, 0x3FB9F490,
/**/ 0x7EAC1DC1, 0x3C52696D,
/**/ 0x4B43E000, 0x3FEFD5C9,
/**/ 0xCB4F92F9, 0xBC62E768,
/**/ 0x8568391D, 0x3FBBF1B7,
/**/ 0x1DEA4CC8, 0x3C5E9184,
/**/ 0x800E99B1, 0x3FEFCF0C,
/**/ 0x86D186AC, 0x3C6EA3D7,
/**/ 0x16C1CCE6, 0x3FBDEE6F,
/**/ 0x2FB71673, 0xBC450F8E,
/**/ 0x78D1BC88, 0x3FEFC7D0,
/**/ 0x447DB685, 0x3C8075D2,
/**/ 0xEE86EE36, 0x3FBFEAAE,
/**/ 0xBCC6F03B, 0xBC4AFCB2,
/**/ 0x527D5BD3, 0x3FEFC015,
/**/ 0x5094EFB8, 0x3C8B68F3,
/**/ 0x8DDD71D1, 0x3FC0F337,
/**/ 0x724F0F9E, 0x3C6D8468,
/**/ 0x2BFE0695, 0x3FEFB7DB,
/**/ 0xF4F65AB1, 0x3C821DAD,
/**/ 0xD7AFCEAF, 0x3FC1F0D3,
/**/ 0x099769A5, 0xBC66EF95,
/**/ 0x263C4BD3, 0x3FEFAF22,
/**/ 0x133A2769, 0xBC552ACE,
/**/ 0x5E4AB88F, 0x3FC2EE28,
/**/ 0x05DEE058, 0xBC6E4D0F,
/**/ 0x641C36F2, 0x3FEFA5EA,
/**/ 0xED17CC7C, 0x3C404DA6,
/**/ 0x2C5D66CB, 0x3FC3EB31,
/**/ 0x6B66CB91, 0x3C647D66,
/**/ 0x0A7CC428, 0x3FEF9C34,
/**/ 0x063B7462, 0x3C8C5B6B,
/**/ 0x4DC5F27B, 0x3FC4E7EA,
/**/ 0x2AC072FC, 0x3C5949DB,
/**/ 0x40374D01, 0x3FEF91FF,
/**/ 0x4D3A9E4C, 0xBC67D03F,
/**/ 0xCFA126F3, 0x3FC5E44F,
/**/ 0x063F89B6, 0xBC66F443,
/**/ 0x2E1EECF6, 0x3FEF874C,
/**/ 0xE1332B16, 0xBC8C6514,
/**/ 0xC05A4D4C, 0x3FC6E05D,
/**/ 0x8B81C940, 0xBBD32C5C,
/**/ 0xFEFFDE24, 0x3FEF7C1A,
/**/ 0xC47540B1, 0xBC78F55B,
/**/ 0x2FBAF2B5, 0x3FC7DC10,
/**/ 0xE23C97C3, 0x3C45AB50,
/**/ 0xDF9ECE1C, 0x3FEF706B,
/**/ 0x0C36DCB4, 0xBC8698C8,
/**/ 0x2EFAA944, 0x3FC8D763,
/**/ 0x62CBB953, 0xBC620FA2,
/**/ 0xFEB82ACD, 0x3FEF643E,
/**/ 0xC1FE28AC, 0x3C76B00A,
/**/ 0xD0CEC312, 0x3FC9D252,
/**/ 0x80B1137D, 0x3C59C43D,
/**/ 0x8CFF6797, 0x3FEF5794,
/**/ 0x3E03B1D5, 0x3C6E3A0D,
/**/ 0x297A0765, 0x3FCACCDB,
/**/ 0x57D6CDEB, 0xBC59883B,
/**/ 0xBD1E3A79, 0x3FEF4A6C,
/**/ 0xEDAEBB57, 0x3C813DF0,
/**/ 0x4EDC6199, 0x3FCBC6F8,
/**/ 0x6A7B0CAB, 0x3C69C1A5,
/**/ 0xC3B3D16E, 0x3FEF3CC7,
/**/ 0xD28A3494, 0xBC621A3A,
/**/ 0x588289A3, 0x3FCCC0A6,
/**/ 0x9BC87C6B, 0xBC6868D0,
/**/ 0xD753FFED, 0x3FEF2EA5,
/**/ 0x5F56D583, 0x3C8CC421,
/**/ 0x5FB5A5D0, 0x3FCDB9E1,
/**/ 0xD6CC6FC2, 0xBC632E20,
/**/ 0x3086649F, 0x3FEF2007,
/**/ 0x16C1984B, 0x3C7B9404,
/**/ 0x7F8AE5A3, 0x3FCEB2A5,
/**/ 0xAF572CEB, 0xBC60BE06,
/**/ 0x09C5873B, 0x3FEF10EC,
/**/ 0x762C1283, 0x3C8D9072,
/**/ 0xD4F31577, 0x3FCFAAEE,
/**/ 0x508E32B8, 0xBC615D88,
/**/ 0x9F7DEEA1, 0x3FEF0154,
/**/ 0x99E5CAFD, 0x3C8D3C1E,
/**/ 0xBF65155C, 0x3FD0515C,
/**/ 0x9DFD8EC8, 0xBC79B8C2,
/**/ 0x300D2F26, 0x3FEEF141,
/**/ 0x08DED372, 0xBC82AA1B,
/**/ 0xCEF36436, 0x3FD0CD00,
/**/ 0x0C93E2B5, 0xBC79FB0A,
/**/ 0xFBC0F11C, 0x3FEEE0B1,
/**/ 0x80BBC3B1, 0xBC4BFD23,
/**/ 0xAA94DDEB, 0x3FD14861,
/**/ 0xB5B615A4, 0xBC6BE881,
/**/ 0x44D5EFA1, 0x3FEECFA7,
/**/ 0x4AF541D0, 0xBC556D0A,
/**/ 0x64C6B876, 0x3FD1C37D,
/**/ 0xFE0DCFF5, 0x3C746076,
/**/ 0x4F76EFA8, 0x3FEEBE21,
/**/ 0x12BA543E, 0xBC802F9F,
/**/ 0x111AAF36, 0x3FD23E52,
/**/ 0x334EFF18, 0xBC74F080,
/**/ 0x61BBAF4F, 0x3FEEAC20,
/**/ 0x3E94658D, 0x3C62C1D5,
/**/ 0xC43EB49F, 0x3FD2B8DD,
/**/ 0x99F2D807, 0x3C615538,
/**/ 0xC3A7CD83, 0x3FEE99A4,
/**/ 0x1BC53CE8, 0xBC82264B,
/**/ 0x94049F87, 0x3FD3331E,
/**/ 0xB40C302C, 0x3C7E0CB6,
/**/ 0xBF29A9ED, 0x3FEE86AE,
/**/ 0xFDBB58A7, 0x3C89397A,
/**/ 0x9769D3D8, 0x3FD3AD12,
/**/ 0x04878398, 0x3C003D55,
/**/ 0xA0193D40, 0x3FEE733E,
/**/ 0x3546CE13, 0xBC86428B,
/**/ 0xE69EE697, 0x3FD426B7,
/**/ 0x5705C59F, 0xBC7F09C7,
/**/ 0xB436E9D0, 0x3FEE5F54,
/**/ 0xD02FC8BC, 0x3C87EB0F,
/**/ 0x9B0F3D20, 0x3FD4A00C,
/**/ 0x6BB08EAD, 0x3C7823BA,
/**/ 0x4B2A449C, 0x3FEE4AF1,
/**/ 0x2E8A6833, 0xBC868CA0,
/**/ 0xCF68A77A, 0x3FD5190E,
/**/ 0x55EEF0F3, 0x3C7B3571,
/**/ 0xB680D6A5, 0x3FEE3614,
/**/ 0xAA015237, 0xBC727793,
/**/ 0x9FA2F597, 0x3FD591BC,
/**/ 0xAC3FE0CB, 0x3C67C74B,
/**/ 0x49ACD6C1, 0x3FEE20BF,
/**/ 0xC7EF636C, 0xBC5660AE,
/**/ 0x29078775, 0x3FD60A14,
/**/ 0x0BA89133, 0x3C5B1FD8,
/**/ 0x5A03DBCE, 0x3FEE0AF1,
/**/ 0x02771AE6, 0x3C5FE8E7,
/**/ 0x8A38D7F7, 0x3FD68213,
/**/ 0x02444AAD, 0xBC7D8892,
/**/ 0x3EBD875E, 0x3FEDF4AB,
/**/ 0x7E6736C4, 0xBC8E2D8A,
/**/ 0xE33A0255, 0x3FD6F9B8,
/**/ 0x4EE9DA0D, 0x3C742BC1,
/**/ 0x50F228D6, 0x3FEDDDED,
/**/ 0xD42BA2BF, 0xBC6E80C8,
/**/ 0x55764214, 0x3FD77102,
/**/ 0x314BB6CE, 0xBC66EAD7,
/**/ 0xEB995912, 0x3FEDC6B7,
/**/ 0x776DCD35, 0x3C54B364,
/**/ 0x03C86D4E, 0x3FD7E7EE,
/**/ 0xDABF5AF2, 0xBC7B63BC,
/**/ 0x6B888E83, 0x3FEDAF0B,
/**/ 0x2B5E5CEA, 0x3C8A249E,
/**/ 0x12826949, 0x3FD85E7A,
/**/ 0x9B5FACE0, 0x3C78A40E,
/**/ 0x2F71A9DC, 0x3FED96E8,
/**/ 0xD5D2039D, 0x3C8FF61B,
/**/ 0xA774992F, 0x3FD8D4A4,
/**/ 0xEA766326, 0x3C744A02,
/**/ 0x97E17B4A, 0x3FED7E4E,
/**/ 0x352BED94, 0xBC63B770,
/**/ 0xE9F546C5, 0x3FD94A6B,
/**/ 0x3E683F58, 0xBC769CE1,
/**/ 0x073E4040, 0x3FED653F,
/**/ 0x434BEC37, 0xBC876236,
/**/ 0x02E80510, 0x3FD9BFCE,
/**/ 0xA320B0A4, 0x3C709E39,
/**/ 0xE1C619E0, 0x3FED4BB9,
/**/ 0x77858F61, 0x3C8F34BB,
/**/ 0x1CC50CCA, 0x3FDA34C9,
/**/ 0x3B50CECD, 0xBC5A310E,
/**/ 0x8D8D7C06, 0x3FED31BF,
/**/ 0x3089CBDD, 0x3C7E60DD,
/**/ 0x63A09277, 0x3FDAA95B,
/**/ 0xB13C0381, 0xBC66293E,
/**/ 0x727D94F0, 0x3FED1750,
/**/ 0x1EC1A48E, 0x3C80D52B,
/**/ 0x05321617, 0x3FDB1D83,
/**/ 0xCB99F519, 0xBC7AE242,
/**/ 0xFA52AD9F, 0x3FECFC6C,
/**/ 0x508F2A0D, 0x3C88B5B5,
/**/ 0x30DBAC43, 0x3FDB913E,
/**/ 0x2F6C3FF1, 0xBC7E38AD,
/**/ 0x909A82E5, 0x3FECE115,
/**/ 0xBB31109A, 0x3C81F139,
/**/ 0x17B140A3, 0x3FDC048B,
/**/ 0x757E9FA7, 0x3C619FE6,
/**/ 0xA2B2972E, 0x3FECC54A,
/**/ 0x2BA83A98, 0x3C64EE16,
/**/ 0xEC7FD19E, 0x3FDC7767,
/**/ 0x1A3D5826, 0xBC5EB14D,
/**/ 0x9FC67D0B, 0x3FECA90C,
/**/ 0x485E3462, 0xBC646A81,
/**/ 0xE3D4A51F, 0x3FDCE9D2,
/**/ 0x12DAE298, 0xBC62FC8A,
/**/ 0xF8CE1A84, 0x3FEC8C5B,
/**/ 0xA1590123, 0x3C7AB3D1,
/**/ 0x34047661, 0x3FDD5BCA,
/**/ 0xA75FC29C, 0x3C728A44,
/**/ 0x208BE53B, 0x3FEC6F39,
/**/ 0xFBAADB42, 0xBC8741DB,
/**/ 0x15329C9A, 0x3FDDCD4C,
/**/ 0xE171FD9A, 0x3C70D4C6,
/**/ 0x8B8B175E, 0x3FEC51A4,
/**/ 0x3B9AA880, 0xBC61BBB4,
/**/ 0xC1582A69, 0x3FDE3E56,
/**/ 0x1099F88F, 0xBC50A482,
/**/ 0xB01DDD81, 0x3FEC339E,
/**/ 0xEE82C5C0, 0xBC8CAAF5,
/**/ 0x744B05F0, 0x3FDEAEE8,
/**/ 0x3C9B027D, 0xBC5789B4,
/**/ 0x065B7D50, 0x3FEC1528,
/**/ 0x1312E828, 0xBC889211,
/**/ 0x6BC4F97B, 0x3FDF1EFF,
/**/ 0xF8A7525C, 0x3C717212,
/**/ 0x081E7536, 0x3FEBF641,
/**/ 0x1628A9A1, 0x3C8B7BD7,
/**/ 0xE76ABC97, 0x3FDF8E99,
/**/ 0xAF2D00A3, 0x3C59D950,
/**/ 0x310294F5, 0x3FEBD6EA,
/**/ 0xC88C109D, 0x3C731BBC,
/**/ 0x28D2F57A, 0x3FDFFDB6,
/**/ 0x2E905B6A, 0x3C6F4A99,
/**/ 0xFE630F32, 0x3FEBB723,
/**/ 0x452D0A39, 0x3C772BD2,
/**/ 0x39C69955, 0x3FE03629,
/**/ 0x78397B01, 0xBC82D8CD,
/**/ 0xEF58840E, 0x3FEB96EE,
/**/ 0xC78FADE0, 0x3C545A3C,
/**/ 0x86946E5B, 0x3FE06D36,
/**/ 0x4538FF1B, 0x3C83F5AE,
/**/ 0x84B704C2, 0x3FEB764B,
/**/ 0xC21B389B, 0xBC8F5848,
/**/ 0x1E9E1001, 0x3FE0A402,
/**/ 0xA13914F6, 0xBC86F643,
/**/ 0x410C104E, 0x3FEB553A,
/**/ 0x47027A16, 0x3C58FF79,
/**/ 0x26B5672E, 0x3FE0DA8B,
/**/ 0xF0BEE909, 0xBC8A58DE,
/**/ 0xA89C8948, 0x3FEB33BB,
/**/ 0x1D1F6CA9, 0x3C8EA6A5,
/**/ 0xC4B69C3B, 0x3FE110D0,
/**/ 0x98809981, 0x3C8D9189,
/**/ 0x4162A4C6, 0x3FEB11D0,
/**/ 0x1EFBC0C2, 0x3C71DD56,
/**/ 0x1F8B7F82, 0x3FE146D2,
/**/ 0x5E2739A8, 0x3C7BF953,
/**/ 0x930BD275, 0x3FEAEF78,
/**/ 0x79746F94, 0xBC7F8362,
/**/ 0x5F2EEDB0, 0x3FE17C8E,
/**/ 0x102E2488, 0x3C635E57,
/**/ 0x26F69DE5, 0x3FEACCB5,
/**/ 0x8DD6B6CC, 0x3C88FB6A,
/**/ 0xACB02FDD, 0x3FE1B204,
/**/ 0x70CBB5FF, 0xBC5F190C,
/**/ 0x88308913, 0x3FEAA986,
/**/ 0x07CD5070, 0xBC0B83D6,
/**/ 0x3236574C, 0x3FE1E734,
/**/ 0xA4F41D5A, 0x3C722A3F,
/**/ 0x4373E02D, 0x3FEA85ED,
/**/ 0x385EC792, 0x3C69BE06,
/**/ 0x1B0394CF, 0x3FE21C1C,
/**/ 0x4B23AA31, 0x3C5E5B32,
/**/ 0xE72586AF, 0x3FEA61E9,
/**/ 0xE2FD453F, 0x3C858330,
/**/ 0x93788BBB, 0x3FE250BB,
/**/ 0x2457BCCE, 0x3C7EA3D0,
/**/ 0x0352BDCF, 0x3FEA3D7D,
/**/ 0xECA19669, 0xBC868DBA,
/**/ 0xC917A067, 0x3FE28511,
/**/ 0xD9A16B70, 0xBC801DF1,
/**/ 0x29AEE445, 0x3FEA18A7,
/**/ 0x736C0358, 0x3C395E25,
/**/ 0xEA88421E, 0x3FE2B91D,
/**/ 0xDB216AB0, 0xBC8FA371,
/**/ 0xED912F85, 0x3FE9F368,
/**/ 0xC5791606, 0xBC81D200,
/**/ 0x279A3082, 0x3FE2ECDF,
/**/ 0xE0E7E37E, 0x3C8D3557,
/**/ 0xE3F25E5C, 0x3FE9CDC2,
/**/ 0x12993F62, 0x3C83F991,
/**/ 0xB148BC4F, 0x3FE32054,
/**/ 0x095A135B, 0x3C8F6B42,
/**/ 0xA36A6514, 0x3FE9A7B5,
/**/ 0xCC9FA7A9, 0x3C8722CF,
/**/ 0xB9BE0367, 0x3FE3537D,
/**/ 0x7AF040F0, 0x3C6B327E,
/**/ 0xC42E1310, 0x3FE98141,
/**/ 0x0488F08D, 0x3C8D1FF8,
/**/ 0x7456282B, 0x3FE38659,
/**/ 0xA93B07A8, 0xBC710FAD,
/**/ 0xE00CB1FD, 0x3FE95A67,
/**/ 0xA21F862D, 0xBC80BEFD,
/**/ 0x15A2840A, 0x3FE3B8E7,
/**/ 0xA7D2F07B, 0xBC797653,
/**/ 0x926D9E92, 0x3FE93328,
/**/ 0x03600CDA, 0xBC8BB770,
/**/ 0xD36CD53A, 0x3FE3EB25,
/**/ 0xE1570FC0, 0xBC5BE570,
/**/ 0x784DDAF7, 0x3FE90B84,
/**/ 0x0AB93B87, 0xBC70FEB1,
/**/ 0xE4BA6790, 0x3FE41D14,
/**/ 0xD287ECF5, 0x3C84608F,
/**/ 0x303D9AD1, 0x3FE8E37C,
/**/ 0xB53D4BF8, 0xBC6463A4,
/**/ 0x81CF386B, 0x3FE44EB3,
/**/ 0x1E6A5505, 0xBC83ED6C,
/**/ 0x5A5DC900, 0x3FE8BB10,
/**/ 0x3E9474C1, 0x3C8863E0,
/**/ 0xE431159F, 0x3FE48000,
/**/ 0x7463ED10, 0xBC8B194A,
/**/ 0x985D871F, 0x3FE89241,
/**/ 0xC413ED84, 0x3C8C48D9,
/**/ 0x46AAB761, 0x3FE4B0FC,
/**/ 0x738CC59A, 0x3C20DA05,
/**/ 0x8D77A6C6, 0x3FE86910,
/**/ 0xE2BFE9DD, 0x3C7338FF,
/**/ 0xE54ED51B, 0x3FE4E1A4,
/**/ 0x89B7C76A, 0xBC8A492F,
/**/ 0xDE701CA0, 0x3FE83F7D,
/**/ 0x609BC6E8, 0xBC4152CF,
/**/ 0xFD7B351C, 0x3FE511F9,
/**/ 0x61C48831, 0xBC85C0E8,
/**/ 0x31916D5D, 0x3FE8158A,
/**/ 0x0B8228DE, 0xBC6DE8B9,
/**/ 0xCDDBB724, 0x3FE541FA,
/**/ 0x8520D391, 0x3C7232C2,
/**/ 0x2EAA1488, 0x3FE7EB36,
/**/ 0xA4A5959F, 0x3C5A1D65,
/**/ 0x966D59B3, 0x3FE571A6,
/**/ 0x4D0FB198, 0x3C5C843B,
/**/ 0x7F09E54F, 0x3FE7C082,
/**/ 0xD72AEE68, 0xBC6C73D6,
/**/ 0x98813A12, 0x3FE5A0FC,
/**/ 0xB7D4227B, 0xBC8D82E2,
/**/ 0xCD7F6543, 0x3FE7956F,
/**/ 0xE9D45AE4, 0xBC8AB276,
/**/ 0x16BF8F0D, 0x3FE5CFFC,
/**/ 0x70EB578A, 0x3C896CB3,
/**/ 0xC655211F, 0x3FE769FE,
/**/ 0xCF8C68C5, 0xBC6827D5,
/**/ 0x552A9E57, 0x3FE5FEA4,
/**/ 0xF7EE20B7, 0x3C80B6CE,
/**/ 0x174EFBA1, 0x3FE73E30,
/**/ 0x3D94AD5F, 0xBC65D3AE,
/**/ 0x9921AC79, 0x3FE62CF4,
/**/ 0x55B6241A, 0xBC8EDD98,
/**/ 0x6FA77678, 0x3FE71204,
/**/ 0xA5029C81, 0x3C8425B0,
/**/ 0x2963E755, 0x3FE65AEC,
/**/ 0x6B71053C, 0x3C8126F9,
/**/ 0x800CF55E, 0x3FE6E57C,
/**/ 0xDEDBD0A6, 0x3C860286,
/**/ 0x4E134B2F, 0x3FE6888A,
/**/ 0x7644D5E6, 0xBC86B7D3,
/**/ 0xFA9EFB5D, 0x3FE6B898,
/**/ 0x86CCF4B2, 0x3C715AC7,
/**/ 0x50B7821A, 0x3FE6B5CE,
/**/ 0x8F702E0F, 0xBC65D515,
/**/ 0x92EB6253, 0x3FE68B5A,
/**/ 0xD985F89C, 0xBC89A91A,
/**/ 0x7C40BDE1, 0x3FE6E2B7,
/**/ 0x857FAD53, 0xBC70E729,
/**/ 0xFDEB8CBA, 0x3FE65DC1,
/**/ 0x47337C77, 0xBC597C1B,
/**/ 0x1D0A8C40, 0x3FE70F45,
/**/ 0x3885770D, 0x3C697EDE,
/**/ 0xF20191C7, 0x3FE62FCF,
/**/ 0x895756EF, 0x3C6D9143,
/**/ 0x80DEA578, 0x3FE73B76,
/**/ 0x06DC12A2, 0xBC722483,
/**/ 0x26F563DF, 0x3FE60185,
/**/ 0xE0E432D0, 0x3C846CA5,
/**/ 0xF6F7B524, 0x3FE7674A,
/**/ 0x94AC84A8, 0x3C7E9D3F,
/**/ 0x55F1F17A, 0x3FE5D2E2,
/**/ 0x04C8892B, 0x3C803141,
/**/ 0xD0041D52, 0x3FE792C1,
/**/ 0xEEB354EB, 0xBC8ABF05,
/**/ 0x39824077, 0x3FE5A3E8,
/**/ 0x2759BE62, 0x3C8428AA,
/**/ 0x5E28B3C2, 0x3FE7BDDA,
/**/ 0x7CCD0393, 0x3C4AD119,
/**/ 0x8D8E83F2, 0x3FE57497,
/**/ 0xAF282D23, 0x3C8F4714,
/**/ 0xF5037959, 0x3FE7E893,
/**/ 0xAA650C4C, 0x3C80EEFB,
/**/ 0x0F592CA5, 0x3FE544F1,
/**/ 0xE6C7A62F, 0xBC8E7AE8,
/**/ 0xE9AE4BA4, 0x3FE812ED,
/**/ 0xDF402DDA, 0xBC87830A,
/**/ 0x7D7BF3DA, 0x3FE514F5,
/**/ 0x8073C259, 0x3C747A10 } };
#endif
#endif

View file

@ -1,352 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/****************************************************************/
/* MODULE_NAME: sincos32.c */
/* */
/* FUNCTIONS: ss32 */
/* cc32 */
/* c32 */
/* sin32 */
/* cos32 */
/* mpsin */
/* mpcos */
/* mpranred */
/* mpsin1 */
/* mpcos1 */
/* */
/* FILES NEEDED: endian.h mpa.h sincos32.h */
/* mpa.c */
/* */
/* Multi Precision sin() and cos() function with p=32 for sin()*/
/* cos() arcsin() and arccos() routines */
/* In addition mpranred() routine performs range reduction of */
/* a double number x into multi precision number y, */
/* such that y=x-n*pi/2, abs(y)<pi/4, n=0,+-1,+-2,.... */
/****************************************************************/
#include "endian.h"
#include "mpa.h"
#include "sincos32.h"
#include "math_private.h"
/****************************************************************/
/* Compute Multi-Precision sin() function for given p. Receive */
/* Multi Precision number x and result stored at y */
/****************************************************************/
static void ss32(mp_no *x, mp_no *y, int p) {
int i;
double a;
#if 0
double b;
static const mp_no mpone = {1,{1.0,1.0}};
#endif
mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}};
#if 0
mp_no mpt2;
#endif
for (i=1;i<=p;i++) mpk.d[i]=0;
__mul(x,x,&x2,p);
__cpy(&oofac27,&gor,p);
__cpy(&gor,&sum,p);
for (a=27.0;a>1.0;a-=2.0) {
mpk.d[1]=a*(a-1.0);
__mul(&gor,&mpk,&mpt1,p);
__cpy(&mpt1,&gor,p);
__mul(&x2,&sum,&mpt1,p);
__sub(&gor,&mpt1,&sum,p);
}
__mul(x,&sum,y,p);
}
/**********************************************************************/
/* Compute Multi-Precision cos() function for given p. Receive Multi */
/* Precision number x and result stored at y */
/**********************************************************************/
static void cc32(mp_no *x, mp_no *y, int p) {
int i;
double a;
#if 0
double b;
static const mp_no mpone = {1,{1.0,1.0}};
#endif
mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}};
#if 0
mp_no mpt2;
#endif
for (i=1;i<=p;i++) mpk.d[i]=0;
__mul(x,x,&x2,p);
mpk.d[1]=27.0;
__mul(&oofac27,&mpk,&gor,p);
__cpy(&gor,&sum,p);
for (a=26.0;a>2.0;a-=2.0) {
mpk.d[1]=a*(a-1.0);
__mul(&gor,&mpk,&mpt1,p);
__cpy(&mpt1,&gor,p);
__mul(&x2,&sum,&mpt1,p);
__sub(&gor,&mpt1,&sum,p);
}
__mul(&x2,&sum,y,p);
}
/***************************************************************************/
/* c32() computes both sin(x), cos(x) as Multi precision numbers */
/***************************************************************************/
void __c32(mp_no *x, mp_no *y, mp_no *z, int p) {
static const mp_no mpt={1,{1.0,2.0}}, one={1,{1.0,1.0}};
mp_no u,t,t1,t2,c,s;
int i;
__cpy(x,&u,p);
u.e=u.e-1;
cc32(&u,&c,p);
ss32(&u,&s,p);
for (i=0;i<24;i++) {
__mul(&c,&s,&t,p);
__sub(&s,&t,&t1,p);
__add(&t1,&t1,&s,p);
__sub(&mpt,&c,&t1,p);
__mul(&t1,&c,&t2,p);
__add(&t2,&t2,&c,p);
}
__sub(&one,&c,y,p);
__cpy(&s,z,p);
}
/************************************************************************/
/*Routine receive double x and two double results of sin(x) and return */
/*result which is more accurate */
/*Computing sin(x) with multi precision routine c32 */
/************************************************************************/
double __sin32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
__dbl_mp(res,&a,p);
__dbl_mp(0.5*(res1-res),&b,p);
__add(&a,&b,&c,p);
if (x>0.8)
{ __sub(&hp,&c,&a,p);
__c32(&a,&b,&c,p);
}
else __c32(&c,&a,&b,p); /* b=sin(0.5*(res+res1)) */
__dbl_mp(x,&c,p); /* c = x */
__sub(&b,&c,&a,p);
/* if a>0 return min(res,res1), otherwise return max(res,res1) */
if (a.d[0]>0) return (res<res1)?res:res1;
else return (res>res1)?res:res1;
}
/************************************************************************/
/*Routine receive double x and two double results of cos(x) and return */
/*result which is more accurate */
/*Computing cos(x) with multi precision routine c32 */
/************************************************************************/
double __cos32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
__dbl_mp(res,&a,p);
__dbl_mp(0.5*(res1-res),&b,p);
__add(&a,&b,&c,p);
if (x>2.4)
{ __sub(&pi,&c,&a,p);
__c32(&a,&b,&c,p);
b.d[0]=-b.d[0];
}
else if (x>0.8)
{ __sub(&hp,&c,&a,p);
__c32(&a,&c,&b,p);
}
else __c32(&c,&b,&a,p); /* b=cos(0.5*(res+res1)) */
__dbl_mp(x,&c,p); /* c = x */
__sub(&b,&c,&a,p);
/* if a>0 return max(res,res1), otherwise return min(res,res1) */
if (a.d[0]>0) return (res>res1)?res:res1;
else return (res<res1)?res:res1;
}
/*******************************************************************/
/*Compute sin(x+dx) as Multi Precision number and return result as */
/* double */
/*******************************************************************/
double __mpsin(double x, double dx) {
int p;
double y;
mp_no a,b,c;
p=32;
__dbl_mp(x,&a,p);
__dbl_mp(dx,&b,p);
__add(&a,&b,&c,p);
if (x>0.8) { __sub(&hp,&c,&a,p); __c32(&a,&b,&c,p); }
else __c32(&c,&a,&b,p); /* b = sin(x+dx) */
__mp_dbl(&b,&y,p);
return y;
}
/*******************************************************************/
/* Compute cos()of double-length number (x+dx) as Multi Precision */
/* number and return result as double */
/*******************************************************************/
double __mpcos(double x, double dx) {
int p;
double y;
mp_no a,b,c;
p=32;
__dbl_mp(x,&a,p);
__dbl_mp(dx,&b,p);
__add(&a,&b,&c,p);
if (x>0.8)
{ __sub(&hp,&c,&b,p);
__c32(&b,&c,&a,p);
}
else __c32(&c,&a,&b,p); /* a = cos(x+dx) */
__mp_dbl(&a,&y,p);
return y;
}
/******************************************************************/
/* mpranred() performs range reduction of a double number x into */
/* multi precision number y, such that y=x-n*pi/2, abs(y)<pi/4, */
/* n=0,+-1,+-2,.... */
/* Return int which indicates in which quarter of circle x is */
/******************************************************************/
int __mpranred(double x, mp_no *y, int p)
{
number v;
double t,xn;
int i,k,n;
static const mp_no one = {1,{1.0,1.0}};
mp_no a,b,c;
if (ABS(x) < 2.8e14) {
t = (x*hpinv.d + toint.d);
xn = t - toint.d;
v.d = t;
n =v.i[LOW_HALF]&3;
__dbl_mp(xn,&a,p);
__mul(&a,&hp,&b,p);
__dbl_mp(x,&c,p);
__sub(&c,&b,y,p);
return n;
}
else { /* if x is very big more precision required */
__dbl_mp(x,&a,p);
a.d[0]=1.0;
k = a.e-5;
if (k < 0) k=0;
b.e = -k;
b.d[0] = 1.0;
for (i=0;i<p;i++) b.d[i+1] = toverp[i+k];
__mul(&a,&b,&c,p);
t = c.d[c.e];
for (i=1;i<=p-c.e;i++) c.d[i]=c.d[i+c.e];
for (i=p+1-c.e;i<=p;i++) c.d[i]=0;
c.e=0;
if (c.d[1] >= 8388608.0)
{ t +=1.0;
__sub(&c,&one,&b,p);
__mul(&b,&hp,y,p);
}
else __mul(&c,&hp,y,p);
n = (int) t;
if (x < 0) { y->d[0] = - y->d[0]; n = -n; }
return (n&3);
}
}
/*******************************************************************/
/* Multi-Precision sin() function subroutine, for p=32. It is */
/* based on the routines mpranred() and c32(). */
/*******************************************************************/
double __mpsin1(double x)
{
int p;
int n;
mp_no u,s,c;
double y;
p=32;
n=__mpranred(x,&u,p); /* n is 0, 1, 2 or 3 */
__c32(&u,&c,&s,p);
switch (n) { /* in which quarter of unit circle y is*/
case 0:
__mp_dbl(&s,&y,p);
return y;
break;
case 2:
__mp_dbl(&s,&y,p);
return -y;
break;
case 1:
__mp_dbl(&c,&y,p);
return y;
break;
case 3:
__mp_dbl(&c,&y,p);
return -y;
break;
}
return 0; /* unreachable, to make the compiler happy */
}
/*****************************************************************/
/* Multi-Precision cos() function subroutine, for p=32. It is */
/* based on the routines mpranred() and c32(). */
/*****************************************************************/
double __mpcos1(double x)
{
int p;
int n;
mp_no u,s,c;
double y;
p=32;
n=__mpranred(x,&u,p); /* n is 0, 1, 2 or 3 */
__c32(&u,&c,&s,p);
switch (n) { /* in what quarter of unit circle y is*/
case 0:
__mp_dbl(&c,&y,p);
return y;
break;
case 2:
__mp_dbl(&c,&y,p);
return -y;
break;
case 1:
__mp_dbl(&s,&y,p);
return -y;
break;
case 3:
__mp_dbl(&s,&y,p);
return y;
break;
}
return 0; /* unreachable, to make the compiler happy */
}
/******************************************************************/

View file

@ -1,82 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:sincos32.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef SINCOS32_H
#define SINCCOS32_H
#ifdef BIG_ENDI
static const number
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883}}, /* 0.63661977236758138 */
/**/ toint = {{0x43380000, 0x00000000}}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
static const number
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30}}, /* 0.63661977236758138 */
/**/ toint = {{0x00000000, 0x43380000}}; /* 6755399441055744 */
#endif
#endif
static const mp_no
oofac27 = {-3,{1.0,7.0,4631664.0,12006312.0,13118056.0,6538613.0,646354.0,
8508025.0,9131256.0,7548776.0,2529842.0,8864927.0,660489.0,15595125.0,12777885.0,
11618489.0,13348664.0,5486686.0,514518.0,11275535.0,4727621.0,3575562.0,
13579710.0,5829745.0,7531862.0,9507898.0,6915060.0,4079264.0,1907586.0,
6078398.0,13789314.0,5504104.0,14136.0}},
pi = {1,{1.0,3.0,
2375530.0,8947107.0,578323.0,1673774.0,225395.0,4498441.0,3678761.0,
10432976.0,536314.0,10021966.0,7113029.0,2630118.0,3723283.0,7847508.0,
6737716.0,15273068.0,12626985.0,12044668.0,5299519.0,8705461.0,11880201.0,
1544726.0,14014857.0,7994139.0,13709579.0,10918111.0,11906095.0,16610011.0,
13638367.0,12040417.0,11529578.0,2522774.0}},
hp = {1,{1.0, 1.0,
9576373.0,4473553.0,8677769.0,9225495.0,112697.0,10637828.0,
10227988.0,13605096.0,268157.0,5010983.0,3556514.0,9703667.0,
1861641.0,12312362.0,3368858.0,7636534.0,6313492.0,14410942.0,
2649759.0,12741338.0,14328708.0,9160971.0,7007428.0,12385677.0,
15243397.0,13847663.0,14341655.0,16693613.0,15207791.0,14408816.0,
14153397.0,1261387.0,6110792.0,2291862.0,4181138.0,5295267.0}};
static const double toverp[75] = {
10680707.0, 7228996.0, 1387004.0, 2578385.0, 16069853.0,
12639074.0, 9804092.0, 4427841.0, 16666979.0, 11263675.0,
12935607.0, 2387514.0, 4345298.0, 14681673.0, 3074569.0,
13734428.0, 16653803.0, 1880361.0, 10960616.0, 8533493.0,
3062596.0, 8710556.0, 7349940.0, 6258241.0, 3772886.0,
3769171.0, 3798172.0, 8675211.0, 12450088.0, 3874808.0,
9961438.0, 366607.0, 15675153.0, 9132554.0, 7151469.0,
3571407.0, 2607881.0, 12013382.0, 4155038.0, 6285869.0,
7677882.0, 13102053.0, 15825725.0, 473591.0, 9065106.0,
15363067.0, 6271263.0, 9264392.0, 5636912.0, 4652155.0,
7056368.0, 13614112.0, 10155062.0, 1944035.0, 9527646.0,
15080200.0, 6658437.0, 6231200.0, 6832269.0, 16767104.0,
5075751.0, 3212806.0, 1398474.0, 7579849.0, 6349435.0,
12618859.0, 4703257.0, 12806093.0, 14477321.0, 2786137.0,
12875403.0, 9837734.0, 14528324.0, 13719321.0, 343717.0 };
#endif

View file

@ -1,66 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**************************************************************************/
/* MODULE_NAME:slowexp.c */
/* */
/* FUNCTION:slowexp */
/* */
/* FILES NEEDED:mpa.h */
/* mpa.c mpexp.c */
/* */
/*Converting from double precision to Multi-precision and calculating */
/* e^x */
/**************************************************************************/
#include "mpa.h"
#include "math_private.h"
void __mpexp(mp_no *x, mp_no *y, int p);
/*Converting from double precision to Multi-precision and calculating e^x */
double __slowexp(double x) {
double w,z,res,eps=3.0e-26;
#if 0
double y;
#endif
int p;
#if 0
int orig,i;
#endif
mp_no mpx, mpy, mpz,mpw,mpeps,mpcor;
p=6;
__dbl_mp(x,&mpx,p); /* Convert a double precision number x */
/* into a multiple precision number mpx with prec. p. */
__mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */
__dbl_mp(eps,&mpeps,p);
__mul(&mpeps,&mpy,&mpcor,p);
__add(&mpy,&mpcor,&mpw,p);
__sub(&mpy,&mpcor,&mpz,p);
__mp_dbl(&mpw, &w, p);
__mp_dbl(&mpz, &z, p);
if (w == z) return w;
else { /* if calculating is not exactly */
p = 32;
__dbl_mp(x,&mpx,p);
__mpexp(&mpx, &mpy, p);
__mp_dbl(&mpy, &res, p);
return res;
}
}

View file

@ -1,74 +0,0 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*************************************************************************/
/* MODULE_NAME:slowpow.c */
/* */
/* FUNCTION:slowpow */
/* */
/*FILES NEEDED:mpa.h */
/* mpa.c mpexp.c mplog.c halfulp.c */
/* */
/* Given two IEEE double machine numbers y,x , routine computes the */
/* correctly rounded (to nearest) value of x^y. Result calculated by */
/* multiplication (in halfulp.c) or if result isn't accurate enough */
/* then routine converts x and y into multi-precision doubles and */
/* calls to mpexp routine */
/*************************************************************************/
#include "mpa.h"
#include "math_private.h"
void __mpexp(mp_no *x, mp_no *y, int p);
void __mplog(mp_no *x, mp_no *y, int p);
double ulog(double);
double __halfulp(double x,double y);
double __slowpow(double x, double y, double z) {
double res,res1;
mp_no mpx, mpy, mpz,mpw,mpp,mpr,mpr1;
static const mp_no eps = {-3,{1.0,4.0}};
int p;
res = __halfulp(x,y); /* halfulp() returns -10 or x^y */
if (res >= 0) return res; /* if result was really computed by halfulp */
/* else, if result was not really computed by halfulp */
p = 10; /* p=precision */
__dbl_mp(x,&mpx,p);
__dbl_mp(y,&mpy,p);
__dbl_mp(z,&mpz,p);
__mplog(&mpx, &mpz, p); /* log(x) = z */
__mul(&mpy,&mpz,&mpw,p); /* y * z =w */
__mpexp(&mpw, &mpp, p); /* e^w =pp */
__add(&mpp,&eps,&mpr,p); /* pp+eps =r */
__mp_dbl(&mpr, &res, p);
__sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */
__mp_dbl(&mpr1, &res1, p); /* converting into double precision */
if (res == res1) return res;
p = 32; /* if we get here result wasn't calculated exactly, continue */
__dbl_mp(x,&mpx,p); /* for more exact calculation */
__dbl_mp(y,&mpy,p);
__dbl_mp(z,&mpz,p);
__mplog(&mpx, &mpz, p); /* log(c)=z */
__mul(&mpy,&mpz,&mpw,p); /* y*z =w */
__mpexp(&mpw, &mpp, p); /* e^w=pp */
__mp_dbl(&mpp, &res, p); /* converting into double precision */
return res;
}

View file

@ -1,436 +0,0 @@
/* Accurate tables for exp().
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* This table has the property that, for all integers -177 <= i <= 177,
exp(i/512.0 + __exp_deltatable[abs(i)]) == __exp_atable[i+177] + r
for some -2^-64 < r < 2^-64 (abs(r) < 2^-65 if i <= 0); and that
__exp_deltatable[abs(i)] == t * 2^-60
for integer t so that abs(t) <= 8847927 * 2^8. */
#define W52 (2.22044605e-16)
#define W55 (2.77555756e-17)
#define W58 (3.46944695e-18)
#define W59 (1.73472348e-18)
#define W60 (8.67361738e-19)
const float __exp_deltatable[178] = {
0*W60, 16558714*W60, -10672149*W59, 1441652*W60,
-15787963*W55, 462888*W60, 7291806*W60, 1698880*W60,
-14375103*W58, -2021016*W60, 728829*W60, -3759654*W60,
3202123*W60, -10916019*W58, -251570*W60, -1043086*W60,
8207536*W60, -409964*W60, -5993931*W60, -475500*W60,
2237522*W60, 324170*W60, -244117*W60, 32077*W60,
123907*W60, -1019734*W60, -143*W60, 813077*W60,
743345*W60, 462461*W60, 629794*W60, 2125066*W60,
-2339121*W60, -337951*W60, 9922067*W60, -648704*W60,
149407*W60, -2687209*W60, -631608*W60, 2128280*W60,
-4882082*W60, 2001360*W60, 175074*W60, 2923216*W60,
-538947*W60, -1212193*W60, -1920926*W60, -1080577*W60,
3690196*W60, 2643367*W60, 2911937*W60, 671455*W60,
-1128674*W60, 593282*W60, -5219347*W60, -1941490*W60,
11007953*W60, 239609*W60, -2969658*W60, -1183650*W60,
942998*W60, 699063*W60, 450569*W60, -329250*W60,
-7257875*W60, -312436*W60, 51626*W60, 555877*W60,
-641761*W60, 1565666*W60, 884327*W60, -10960035*W60,
-2004679*W60, -995793*W60, -2229051*W60, -146179*W60,
-510327*W60, 1453482*W60, -3778852*W60, -2238056*W60,
-4895983*W60, 3398883*W60, -252738*W60, 1230155*W60,
346918*W60, 1109352*W60, 268941*W60, -2930483*W60,
-1036263*W60, -1159280*W60, 1328176*W60, 2937642*W60,
-9371420*W60, -6902650*W60, -1419134*W60, 1442904*W60,
-1319056*W60, -16369*W60, 696555*W60, -279987*W60,
-7919763*W60, 252741*W60, 459711*W60, -1709645*W60,
354913*W60, 6025867*W60, -421460*W60, -853103*W60,
-338649*W60, 962151*W60, 955965*W60, 784419*W60,
-3633653*W60, 2277133*W60, -8847927*W52, 1223028*W60,
5907079*W60, 623167*W60, 5142888*W60, 2599099*W60,
1214280*W60, 4870359*W60, 593349*W60, -57705*W60,
7761209*W60, -5564097*W60, 2051261*W60, 6216869*W60,
4692163*W60, 601691*W60, -5264906*W60, 1077872*W60,
-3205949*W60, 1833082*W60, 2081746*W60, -987363*W60,
-1049535*W60, 2015244*W60, 874230*W60, 2168259*W60,
-1740124*W60, -10068269*W60, -18242*W60, -3013583*W60,
580601*W60, -2547161*W60, -535689*W60, 2220815*W60,
1285067*W60, 2806933*W60, -983086*W60, -1729097*W60,
-1162985*W60, -2561904*W60, 801988*W60, 244351*W60,
1441893*W60, -7517981*W60, 271781*W60, -15021588*W60,
-2341588*W60, -919198*W60, 1642232*W60, 4771771*W60,
-1220099*W60, -3062372*W60, 628624*W60, 1278114*W60,
13083513*W60, -10521925*W60, 3180310*W60, -1659307*W60,
3543773*W60, 2501203*W60, 4151*W60, -340748*W60,
-2285625*W60, 2495202*W60
};
const double __exp_atable[355] /* __attribute__((mode(DF))) */ = {
0.707722561055888932371, /* 0x0.b52d4e46605c27ffd */
0.709106182438804188967, /* 0x0.b587fb96f75097ffb */
0.710492508843861281234, /* 0x0.b5e2d649899167ffd */
0.711881545564593931623, /* 0x0.b63dde74d36bdfffe */
0.713273297897442870573, /* 0x0.b699142f945f87ffc */
0.714667771153751463236, /* 0x0.b6f477909c4ea0001 */
0.716064970655995725059, /* 0x0.b75008aec758f8004 */
0.717464901723956938193, /* 0x0.b7abc7a0eea7e0002 */
0.718867569715736398602, /* 0x0.b807b47e1586c7ff8 */
0.720272979947266023271, /* 0x0.b863cf5d10e380003 */
0.721681137825144314297, /* 0x0.b8c01855195c37ffb */
0.723092048691992950199, /* 0x0.b91c8f7d213740004 */
0.724505717938892290800, /* 0x0.b97934ec5002d0007 */
0.725922150953176470431, /* 0x0.b9d608b9c92ea7ffc */
0.727341353138962865022, /* 0x0.ba330afcc29e98003 */
0.728763329918453162104, /* 0x0.ba903bcc8618b7ffc */
0.730188086709957051568, /* 0x0.baed9b40591ba0000 */
0.731615628948127705309, /* 0x0.bb4b296f931e30002 */
0.733045962086486091436, /* 0x0.bba8e671a05617ff9 */
0.734479091556371366251, /* 0x0.bc06d25dd49568001 */
0.735915022857225542529, /* 0x0.bc64ed4bce8f6fff9 */
0.737353761441304711410, /* 0x0.bcc33752f915d7ff9 */
0.738795312814142124419, /* 0x0.bd21b08af98e78005 */
0.740239682467211168593, /* 0x0.bd80590b65e9a8000 */
0.741686875913991849885, /* 0x0.bddf30ebec4a10000 */
0.743136898669507939299, /* 0x0.be3e38443c84e0007 */
0.744589756269486091620, /* 0x0.be9d6f2c1d32a0002 */
0.746045454254026796384, /* 0x0.befcd5bb59baf8004 */
0.747503998175051087583, /* 0x0.bf5c6c09ca84c0003 */
0.748965393601880857739, /* 0x0.bfbc322f5b18b7ff8 */
0.750429646104262104698, /* 0x0.c01c2843f776fffff */
0.751896761271877989160, /* 0x0.c07c4e5fa18b88002 */
0.753366744698445112140, /* 0x0.c0dca49a5fb18fffd */
0.754839601988627206827, /* 0x0.c13d2b0c444db0005 */
0.756315338768691947122, /* 0x0.c19de1cd798578006 */
0.757793960659406629066, /* 0x0.c1fec8f623723fffd */
0.759275473314173443536, /* 0x0.c25fe09e8a0f47ff8 */
0.760759882363831851927, /* 0x0.c2c128dedc88f8000 */
0.762247193485956486805, /* 0x0.c322a1cf7d6e7fffa */
0.763737412354726363781, /* 0x0.c3844b88cb9347ffc */
0.765230544649828092739, /* 0x0.c3e626232bd8f7ffc */
0.766726596071518051729, /* 0x0.c44831b719bf18002 */
0.768225572321911687194, /* 0x0.c4aa6e5d12d078001 */
0.769727479119219348810, /* 0x0.c50cdc2da64a37ffb */
0.771232322196981678892, /* 0x0.c56f7b41744490001 */
0.772740107296721268087, /* 0x0.c5d24bb1259e70004 */
0.774250840160724651565, /* 0x0.c6354d95640dd0007 */
0.775764526565368872643, /* 0x0.c6988106fec447fff */
0.777281172269557396602, /* 0x0.c6fbe61eb1bd0ffff */
0.778800783068235302750, /* 0x0.c75f7cf560942fffc */
0.780323364758801041312, /* 0x0.c7c345a3f1983fffe */
0.781848923151573727006, /* 0x0.c8274043594cb0002 */
0.783377464064598849602, /* 0x0.c88b6cec94b3b7ff9 */
0.784908993312207869935, /* 0x0.c8efcbb89cba27ffe */
0.786443516765346961618, /* 0x0.c9545cc0a88c70003 */
0.787981040257604625744, /* 0x0.c9b9201dc643bfffa */
0.789521569657452682047, /* 0x0.ca1e15e92a5410007 */
0.791065110849462849192, /* 0x0.ca833e3c1ae510005 */
0.792611669712891875319, /* 0x0.cae8992fd84667ffd */
0.794161252150049179450, /* 0x0.cb4e26ddbc207fff8 */
0.795713864077794763584, /* 0x0.cbb3e75f301b60003 */
0.797269511407239561694, /* 0x0.cc19dacd978cd8002 */
0.798828200086368567220, /* 0x0.cc8001427e55d7ffb */
0.800389937624300440456, /* 0x0.cce65ade24d360006 */
0.801954725261124767840, /* 0x0.cd4ce7a5de839fffb */
0.803522573691593189330, /* 0x0.cdb3a7c79a678fffd */
0.805093487311204114563, /* 0x0.ce1a9b563965ffffc */
0.806667472122675088819, /* 0x0.ce81c26b838db8000 */
0.808244534127439906441, /* 0x0.cee91d213f8428002 */
0.809824679342317166307, /* 0x0.cf50ab9144d92fff9 */
0.811407913793616542005, /* 0x0.cfb86dd5758c2ffff */
0.812994243520784198882, /* 0x0.d0206407c20e20005 */
0.814583674571603966162, /* 0x0.d0888e4223facfff9 */
0.816176213022088536960, /* 0x0.d0f0ec9eb3f7c8002 */
0.817771864936188586101, /* 0x0.d1597f377d6768002 */
0.819370636400374108252, /* 0x0.d1c24626a46eafff8 */
0.820972533518165570298, /* 0x0.d22b41865ff1e7ff9 */
0.822577562404315121269, /* 0x0.d2947170f32ec7ff9 */
0.824185729164559344159, /* 0x0.d2fdd60097795fff8 */
0.825797039949601741075, /* 0x0.d3676f4fb796d0001 */
0.827411500902565544264, /* 0x0.d3d13d78b5f68fffb */
0.829029118181348834154, /* 0x0.d43b40960546d8001 */
0.830649897953322891022, /* 0x0.d4a578c222a058000 */
0.832273846408250750368, /* 0x0.d50fe617a3ba78005 */
0.833900969738858188772, /* 0x0.d57a88b1218e90002 */
0.835531274148056613016, /* 0x0.d5e560a94048f8006 */
0.837164765846411529371, /* 0x0.d6506e1aac8078003 */
0.838801451086016225394, /* 0x0.d6bbb1204074e0001 */
0.840441336100884561780, /* 0x0.d72729d4c28518004 */
0.842084427144139224814, /* 0x0.d792d8530e12b0001 */
0.843730730487052604790, /* 0x0.d7febcb61273e7fff */
0.845380252404570153833, /* 0x0.d86ad718c308dfff9 */
0.847032999194574087728, /* 0x0.d8d727962c69d7fff */
0.848688977161248581090, /* 0x0.d943ae49621ce7ffb */
0.850348192619261200615, /* 0x0.d9b06b4d832ef8005 */
0.852010651900976245816, /* 0x0.da1d5ebdc22220005 */
0.853676361342631029337, /* 0x0.da8a88b555baa0006 */
0.855345327311054837175, /* 0x0.daf7e94f965f98004 */
0.857017556155879489641, /* 0x0.db6580a7c98f7fff8 */
0.858693054267390953857, /* 0x0.dbd34ed9617befff8 */
0.860371828028939855647, /* 0x0.dc4153ffc8b65fff9 */
0.862053883854957292436, /* 0x0.dcaf90368bfca8004 */
0.863739228154875360306, /* 0x0.dd1e0399328d87ffe */
0.865427867361348468455, /* 0x0.dd8cae435d303fff9 */
0.867119807911702289458, /* 0x0.ddfb9050b1cee8006 */
0.868815056264353846599, /* 0x0.de6aa9dced8448001 */
0.870513618890481399881, /* 0x0.ded9fb03db7320006 */
0.872215502247877139094, /* 0x0.df4983e1380657ff8 */
0.873920712852848668986, /* 0x0.dfb94490ffff77ffd */
0.875629257204025623884, /* 0x0.e0293d2f1cb01fff9 */
0.877341141814212965880, /* 0x0.e0996dd786fff0007 */
0.879056373217612985183, /* 0x0.e109d6a64f5d57ffc */
0.880774957955916648615, /* 0x0.e17a77b78e72a7ffe */
0.882496902590150900078, /* 0x0.e1eb5127722cc7ff8 */
0.884222213673356738383, /* 0x0.e25c63121fb0c8006 */
0.885950897802399772740, /* 0x0.e2cdad93ec5340003 */
0.887682961567391237685, /* 0x0.e33f30c925fb97ffb */
0.889418411575228162725, /* 0x0.e3b0ecce2d05ffff9 */
0.891157254447957902797, /* 0x0.e422e1bf727718006 */
0.892899496816652704641, /* 0x0.e4950fb9713fc7ffe */
0.894645145323828439008, /* 0x0.e50776d8b0e60fff8 */
0.896394206626591749641, /* 0x0.e57a1739c8fadfffc */
0.898146687421414902124, /* 0x0.e5ecf0f97c5798007 */
0.899902594367530173098, /* 0x0.e660043464e378005 */
0.901661934163603406867, /* 0x0.e6d3510747e150006 */
0.903424713533971135418, /* 0x0.e746d78f06cd97ffd */
0.905190939194458810123, /* 0x0.e7ba97e879c91fffc */
0.906960617885092856864, /* 0x0.e82e92309390b0007 */
0.908733756358986566306, /* 0x0.e8a2c6845544afffa */
0.910510361377119825629, /* 0x0.e9173500c8abc7ff8 */
0.912290439722343249336, /* 0x0.e98bddc30f98b0002 */
0.914073998177417412765, /* 0x0.ea00c0e84bc4c7fff */
0.915861043547953501680, /* 0x0.ea75de8db8094fffe */
0.917651582652244779397, /* 0x0.eaeb36d09d3137ffe */
0.919445622318405764159, /* 0x0.eb60c9ce4ed3dffff */
0.921243169397334638073, /* 0x0.ebd697a43995b0007 */
0.923044230737526172328, /* 0x0.ec4ca06fc7768fffa */
0.924848813220121135342, /* 0x0.ecc2e44e865b6fffb */
0.926656923710931002014, /* 0x0.ed39635df34e70006 */
0.928468569126343790092, /* 0x0.edb01dbbc2f5b7ffa */
0.930283756368834757725, /* 0x0.ee2713859aab57ffa */
0.932102492359406786818, /* 0x0.ee9e44d9342870004 */
0.933924784042873379360, /* 0x0.ef15b1d4635438005 */
0.935750638358567643520, /* 0x0.ef8d5a94f60f50007 */
0.937580062297704630580, /* 0x0.f0053f38f345cffff */
0.939413062815381727516, /* 0x0.f07d5fde3a2d98001 */
0.941249646905368053689, /* 0x0.f0f5bca2d481a8004 */
0.943089821583810716806, /* 0x0.f16e55a4e497d7ffe */
0.944933593864477061592, /* 0x0.f1e72b028a2827ffb */
0.946780970781518460559, /* 0x0.f2603cd9fb5430001 */
0.948631959382661205081, /* 0x0.f2d98b497d2a87ff9 */
0.950486566729423554277, /* 0x0.f353166f63e3dffff */
0.952344799896018723290, /* 0x0.f3ccde6a11ae37ffe */
0.954206665969085765512, /* 0x0.f446e357f66120000 */
0.956072172053890279009, /* 0x0.f4c12557964f0fff9 */
0.957941325265908139014, /* 0x0.f53ba48781046fffb */
0.959814132734539637840, /* 0x0.f5b66106555d07ffa */
0.961690601603558903308, /* 0x0.f6315af2c2027fffc */
0.963570739036113010927, /* 0x0.f6ac926b8aeb80004 */
0.965454552202857141381, /* 0x0.f728078f7c5008002 */
0.967342048278315158608, /* 0x0.f7a3ba7d66a908001 */
0.969233234469444204768, /* 0x0.f81fab543e1897ffb */
0.971128118008140250896, /* 0x0.f89bda33122c78007 */
0.973026706099345495256, /* 0x0.f9184738d4cf97ff8 */
0.974929006031422851235, /* 0x0.f994f284d3a5c0008 */
0.976835024947348973265, /* 0x0.fa11dc35bc7820002 */
0.978744770239899142285, /* 0x0.fa8f046b4fb7f8007 */
0.980658249138918636210, /* 0x0.fb0c6b449ab1cfff9 */
0.982575468959622777535, /* 0x0.fb8a10e1088fb7ffa */
0.984496437054508843888, /* 0x0.fc07f5602d79afffc */
0.986421160608523028820, /* 0x0.fc8618e0e55e47ffb */
0.988349647107594098099, /* 0x0.fd047b83571b1fffa */
0.990281903873210800357, /* 0x0.fd831d66f4c018002 */
0.992217938695037382475, /* 0x0.fe01fead3320bfff8 */
0.994157757657894713987, /* 0x0.fe811f703491e8006 */
0.996101369488558541238, /* 0x0.ff007fd5744490005 */
0.998048781093141101932, /* 0x0.ff801ffa9b9280007 */
1.000000000000000000000, /* 0x1.00000000000000000 */
1.001955033605393285965, /* 0x1.0080200565d29ffff */
1.003913889319761887310, /* 0x1.0100802aa0e80fff0 */
1.005876574715736104818, /* 0x1.01812090377240007 */
1.007843096764807100351, /* 0x1.020201541aad7fff6 */
1.009813464316352327214, /* 0x1.0283229c4c9820007 */
1.011787683565730677817, /* 0x1.030484836910a000e */
1.013765762469146736174, /* 0x1.0386272b9c077fffe */
1.015747708536026694351, /* 0x1.04080ab526304fff0 */
1.017733529475172815584, /* 0x1.048a2f412375ffff0 */
1.019723232714418781378, /* 0x1.050c94ef7ad5e000a */
1.021716825883923762690, /* 0x1.058f3be0f1c2d0004 */
1.023714316605201180057, /* 0x1.06122436442e2000e */
1.025715712440059545995, /* 0x1.06954e0fec63afff2 */
1.027721021151397406936, /* 0x1.0718b98f41c92fff6 */
1.029730250269221158939, /* 0x1.079c66d49bb2ffff1 */
1.031743407506447551857, /* 0x1.082056011a9230009 */
1.033760500517691527387, /* 0x1.08a487359ebd50002 */
1.035781537016238873464, /* 0x1.0928fa93490d4fff3 */
1.037806524719013578963, /* 0x1.09adb03b3e5b3000d */
1.039835471338248051878, /* 0x1.0a32a84e9e5760004 */
1.041868384612101516848, /* 0x1.0ab7e2eea5340ffff */
1.043905272300907460835, /* 0x1.0b3d603ca784f0009 */
1.045946142174331239262, /* 0x1.0bc3205a042060000 */
1.047991002016745332165, /* 0x1.0c4923682a086fffe */
1.050039859627715177527, /* 0x1.0ccf698898f3a000d */
1.052092722826109660856, /* 0x1.0d55f2dce5d1dfffb */
1.054149599440827866881, /* 0x1.0ddcbf86b09a5fff6 */
1.056210497317612961855, /* 0x1.0e63cfa7abc97fffd */
1.058275424318780855142, /* 0x1.0eeb23619c146fffb */
1.060344388322010722446, /* 0x1.0f72bad65714bffff */
1.062417397220589476718, /* 0x1.0ffa9627c38d30004 */
1.064494458915699715017, /* 0x1.1082b577d0eef0003 */
1.066575581342167566880, /* 0x1.110b18e893a90000a */
1.068660772440545025953, /* 0x1.1193c09c267610006 */
1.070750040138235936705, /* 0x1.121cacb4959befff6 */
1.072843392435016474095, /* 0x1.12a5dd543cf36ffff */
1.074940837302467588937, /* 0x1.132f529d59552000b */
1.077042382749654914030, /* 0x1.13b90cb250d08fff5 */
1.079148036789447484528, /* 0x1.14430bb58da3dfff9 */
1.081257807444460983297, /* 0x1.14cd4fc984c4a000e */
1.083371702785017154417, /* 0x1.1557d910df9c7000e */
1.085489730853784307038, /* 0x1.15e2a7ae292d30002 */
1.087611899742884524772, /* 0x1.166dbbc422d8c0004 */
1.089738217537583819804, /* 0x1.16f9157586772ffff */
1.091868692357631731528, /* 0x1.1784b4e533cacfff0 */
1.094003332327482702577, /* 0x1.18109a360fc23fff2 */
1.096142145591650907149, /* 0x1.189cc58b155a70008 */
1.098285140311341168136, /* 0x1.1929370751ea50002 */
1.100432324652149906842, /* 0x1.19b5eecdd79cefff0 */
1.102583706811727015711, /* 0x1.1a42ed01dbdba000e */
1.104739294993289488947, /* 0x1.1ad031c69a2eafff0 */
1.106899097422573863281, /* 0x1.1b5dbd3f66e120003 */
1.109063122341542140286, /* 0x1.1beb8f8fa8150000b */
1.111231377994659874592, /* 0x1.1c79a8dac6ad0fff4 */
1.113403872669181282605, /* 0x1.1d0809445a97ffffc */
1.115580614653132185460, /* 0x1.1d96b0effc9db000e */
1.117761612217810673898, /* 0x1.1e25a001332190000 */
1.119946873713312474002, /* 0x1.1eb4d69bdb2a9fff1 */
1.122136407473298902480, /* 0x1.1f4454e3bfae00006 */
1.124330221845670330058, /* 0x1.1fd41afcbb48bfff8 */
1.126528325196519908506, /* 0x1.2064290abc98c0001 */
1.128730725913251964394, /* 0x1.20f47f31c9aa7000f */
1.130937432396844410880, /* 0x1.21851d95f776dfff0 */
1.133148453059692917203, /* 0x1.2216045b6784efffa */
1.135363796355857157764, /* 0x1.22a733a6692ae0004 */
1.137583470716100553249, /* 0x1.2338ab9b3221a0004 */
1.139807484614418608939, /* 0x1.23ca6c5e27aadfff7 */
1.142035846532929888057, /* 0x1.245c7613b7f6c0004 */
1.144268564977221958089, /* 0x1.24eec8e06b035000c */
1.146505648458203463465, /* 0x1.258164e8cea85fff8 */
1.148747105501412235671, /* 0x1.26144a5180d380009 */
1.150992944689175123667, /* 0x1.26a7793f5de2efffa */
1.153243174560058870217, /* 0x1.273af1d712179000d */
1.155497803703682491111, /* 0x1.27ceb43d81d42fff1 */
1.157756840726344771440, /* 0x1.2862c097a3d29000c */
1.160020294239811677834, /* 0x1.28f7170a74cf4fff1 */
1.162288172883275239058, /* 0x1.298bb7bb0faed0004 */
1.164560485298402170388, /* 0x1.2a20a2ce920dffff4 */
1.166837240167474476460, /* 0x1.2ab5d86a4631ffff6 */
1.169118446164539637555, /* 0x1.2b4b58b36d5220009 */
1.171404112007080167155, /* 0x1.2be123cf786790002 */
1.173694246390975415341, /* 0x1.2c7739e3c0aac000d */
1.175988858069749065617, /* 0x1.2d0d9b15deb58fff6 */
1.178287955789017793514, /* 0x1.2da4478b627040002 */
1.180591548323240091978, /* 0x1.2e3b3f69fb794fffc */
1.182899644456603782686, /* 0x1.2ed282d76421d0004 */
1.185212252993012693694, /* 0x1.2f6a11f96c685fff3 */
1.187529382762033236513, /* 0x1.3001ecf60082ffffa */
1.189851042595508889847, /* 0x1.309a13f30f28a0004 */
1.192177241354644978669, /* 0x1.31328716a758cfff7 */
1.194507987909589896687, /* 0x1.31cb4686e1e85fffb */
1.196843291137896336843, /* 0x1.32645269dfd04000a */
1.199183159977805113226, /* 0x1.32fdaae604c39000f */
1.201527603343041317132, /* 0x1.339750219980dfff3 */
1.203876630171082595692, /* 0x1.3431424300e480007 */
1.206230249419600664189, /* 0x1.34cb8170b3fee000e */
1.208588470077065268869, /* 0x1.35660dd14dbd4fffc */
1.210951301134513435915, /* 0x1.3600e78b6bdfc0005 */
1.213318751604272271958, /* 0x1.369c0ec5c38ebfff2 */
1.215690830512196507537, /* 0x1.373783a718d29000f */
1.218067546930756250870, /* 0x1.37d3465662f480007 */
1.220448909901335365929, /* 0x1.386f56fa770fe0008 */
1.222834928513994334780, /* 0x1.390bb5ba5fc540004 */
1.225225611877684750397, /* 0x1.39a862bd3c7a8fff3 */
1.227620969111500981433, /* 0x1.3a455e2a37bcafffd */
1.230021009336254911271, /* 0x1.3ae2a8287dfbefff6 */
1.232425741726685064472, /* 0x1.3b8040df76f39fffa */
1.234835175450728295084, /* 0x1.3c1e287682e48fff1 */
1.237249319699482263931, /* 0x1.3cbc5f151b86bfff8 */
1.239668183679933477545, /* 0x1.3d5ae4e2cc0a8000f */
1.242091776620540377629, /* 0x1.3df9ba07373bf0006 */
1.244520107762172811399, /* 0x1.3e98deaa0d8cafffe */
1.246953186383919165383, /* 0x1.3f3852f32973efff0 */
1.249391019292643401078, /* 0x1.3fd816ffc72b90001 */
1.251833623164381181797, /* 0x1.40782b17863250005 */
1.254280999953110153911, /* 0x1.41188f42caf400000 */
1.256733161434815393410, /* 0x1.41b943b42945bfffd */
1.259190116985283935980, /* 0x1.425a4893e5f10000a */
1.261651875958665236542, /* 0x1.42fb9e0a2df4c0009 */
1.264118447754797758244, /* 0x1.439d443f608c4fff9 */
1.266589841787181258708, /* 0x1.443f3b5bebf850008 */
1.269066067469190262045, /* 0x1.44e183883e561fff7 */
1.271547134259576328224, /* 0x1.45841cecf7a7a0001 */
1.274033051628237434048, /* 0x1.462707b2c43020009 */
1.276523829025464573684, /* 0x1.46ca44023aa410007 */
1.279019475999373156531, /* 0x1.476dd2045d46ffff0 */
1.281520002043128991825, /* 0x1.4811b1e1f1f19000b */
1.284025416692967214122, /* 0x1.48b5e3c3edd74fff4 */
1.286535729509738823464, /* 0x1.495a67d3613c8fff7 */
1.289050950070396384145, /* 0x1.49ff3e396e19d000b */
1.291571087985403654081, /* 0x1.4aa4671f5b401fff1 */
1.294096152842774794011, /* 0x1.4b49e2ae56d19000d */
1.296626154297237043484, /* 0x1.4befb10fd84a3fff4 */
1.299161101984141142272, /* 0x1.4c95d26d41d84fff8 */
1.301701005575179204100, /* 0x1.4d3c46f01d9f0fff3 */
1.304245874766450485904, /* 0x1.4de30ec21097d0003 */
1.306795719266019562007, /* 0x1.4e8a2a0ccce3d0002 */
1.309350548792467483458, /* 0x1.4f3198fa10346fff5 */
1.311910373099227200545, /* 0x1.4fd95bb3be8cffffd */
1.314475201942565174546, /* 0x1.50817263bf0e5fffb */
1.317045045107389400535, /* 0x1.5129dd3418575000e */
1.319619912422941299109, /* 0x1.51d29c4f01c54ffff */
1.322199813675649204855, /* 0x1.527bafde83a310009 */
1.324784758729532718739, /* 0x1.5325180cfb8b3fffd */
1.327374757430096474625, /* 0x1.53ced504b2bd0fff4 */
1.329969819671041886272, /* 0x1.5478e6f02775e0001 */
1.332569955346704748651, /* 0x1.55234df9d8a59fff8 */
1.335175174370685002822, /* 0x1.55ce0a4c5a6a9fff6 */
1.337785486688218616860, /* 0x1.56791c1263abefff7 */
1.340400902247843806217, /* 0x1.57248376aef21fffa */
1.343021431036279800211, /* 0x1.57d040a420c0bfff3 */
1.345647083048053138662, /* 0x1.587c53c5a630f0002 */
1.348277868295411074918, /* 0x1.5928bd063fd7bfff9 */
1.350913796821875845231, /* 0x1.59d57c9110ad60006 */
1.353554878672557082439, /* 0x1.5a8292913d68cfffc */
1.356201123929036356254, /* 0x1.5b2fff3212db00007 */
1.358852542671913132777, /* 0x1.5bddc29edcc06fff3 */
1.361509145047255398051, /* 0x1.5c8bdd032ed16000f */
1.364170941142184734180, /* 0x1.5d3a4e8a5bf61fff4 */
1.366837941171020309735, /* 0x1.5de9176042f1effff */
1.369510155261156381121, /* 0x1.5e9837b062f4e0005 */
1.372187593620959988833, /* 0x1.5f47afa69436cfff1 */
1.374870266463378287715, /* 0x1.5ff77f6eb3f8cfffd */
1.377558184010425845733, /* 0x1.60a7a734a9742fff9 */
1.380251356531521533853, /* 0x1.6158272490016000c */
1.382949794301995272203, /* 0x1.6208ff6a8978a000f */
1.385653507605306700170, /* 0x1.62ba3032c0a280004 */
1.388362506772382154503, /* 0x1.636bb9a994784000f */
1.391076802081129493127, /* 0x1.641d9bfb29a7bfff6 */
1.393796403973427855412, /* 0x1.64cfd7545928b0002 */
1.396521322756352656542, /* 0x1.65826be167badfff8 */
1.399251568859207761660, /* 0x1.663559cf20826000c */
1.401987152677323100733, /* 0x1.66e8a14a29486fffc */
1.404728084651919228815, /* 0x1.679c427f5a4b6000b */
1.407474375243217723560, /* 0x1.68503d9ba0add000f */
1.410226034922914983815, /* 0x1.690492cbf6303fff9 */
1.412983074197955213304, /* 0x1.69b9423d7b548fff6 */
};

View file

@ -1,585 +0,0 @@
/* These values are accurate to 52+12 bits when represented as
a double. */
static const double exp2_accuratetable[512] = {
0.707106781187802013759 /* 0x0.b504f333fb3f80007 */,
0.708064712808760599040 /* 0x0.b543baa0f71b38000 */,
0.709023942160304065938 /* 0x0.b58297d3a8d518002 */,
0.709984470998547667624 /* 0x0.b5c18ad39b4ba0001 */,
0.710946301084324217006 /* 0x0.b60093a85e8d30001 */,
0.711909434180505784637 /* 0x0.b63fb25984e628005 */,
0.712873872052760648733 /* 0x0.b67ee6eea3b5f8003 */,
0.713839616467838999908 /* 0x0.b6be316f518c98001 */,
0.714806669195984345523 /* 0x0.b6fd91e328d148007 */,
0.715775032009894562898 /* 0x0.b73d0851c69e20002 */,
0.716744706683768884058 /* 0x0.b77c94c2c9b3d0003 */,
0.717715694995770148178 /* 0x0.b7bc373dd52eb0003 */,
0.718687998724665488852 /* 0x0.b7fbefca8cd530004 */,
0.719661619652575468291 /* 0x0.b83bbe70981da8001 */,
0.720636559564428180758 /* 0x0.b87ba337a194b0006 */,
0.721612820246623098989 /* 0x0.b8bb9e27556508004 */,
0.722590403488338473025 /* 0x0.b8fbaf4762c798006 */,
0.723569311081411870036 /* 0x0.b93bd69f7be1d0000 */,
0.724549544820974333906 /* 0x0.b97c1437567828007 */,
0.725531106502312561633 /* 0x0.b9bc6816a87ae8002 */,
0.726513997924421062181 /* 0x0.b9fcd2452bee00000 */,
0.727498220889519875430 /* 0x0.ba3d52ca9e6148002 */,
0.728483777200401694265 /* 0x0.ba7de9aebe05c8003 */,
0.729470668664712662563 /* 0x0.babe96f94e62a8002 */,
0.730458897090379144517 /* 0x0.baff5ab2134df0004 */,
0.731448464287988597833 /* 0x0.bb4034e0d38ab0000 */,
0.732439372072965166897 /* 0x0.bb81258d5b2d60001 */,
0.733431622260458326859 /* 0x0.bbc22cbf75fd28001 */,
0.734425216668725511232 /* 0x0.bc034a7ef32c00001 */,
0.735420157118880535324 /* 0x0.bc447ed3a50fe0005 */,
0.736416445434497690674 /* 0x0.bc85c9c560b350001 */,
0.737414083433310718618 /* 0x0.bcc72b5bf4b4e0000 */,
0.738413072966152328496 /* 0x0.bd08a39f5417a8007 */,
0.739413415848264365956 /* 0x0.bd4a32974abcd0002 */,
0.740415113911250699637 /* 0x0.bd8bd84bb68300002 */,
0.741418168994518067562 /* 0x0.bdcd94c47ddd30003 */,
0.742422582936659858376 /* 0x0.be0f6809865968006 */,
0.743428357577745613238 /* 0x0.be515222b72530003 */,
0.744435494762383687126 /* 0x0.be935317fc6ba0002 */,
0.745443996335090397492 /* 0x0.bed56af1423de8001 */,
0.746453864145572798553 /* 0x0.bf1799b67a6248007 */,
0.747465100043933849969 /* 0x0.bf59df6f970e70002 */,
0.748477705883256683178 /* 0x0.bf9c3c248dbee8001 */,
0.749491683518965001732 /* 0x0.bfdeafdd568308000 */,
0.750507034813367890373 /* 0x0.c0213aa1f0fc38004 */,
0.751523761622240105153 /* 0x0.c063dc7a559ca0003 */,
0.752541865811731880422 /* 0x0.c0a6956e883ed8000 */,
0.753561349247157341600 /* 0x0.c0e965868bd220006 */,
0.754582213796583967110 /* 0x0.c12c4cca664cb8002 */,
0.755604461332336940791 /* 0x0.c16f4b42225350006 */,
0.756628093726406381068 /* 0x0.c1b260f5ca2c48002 */,
0.757653112855631305506 /* 0x0.c1f58ded6d72d8001 */,
0.758679520599333412360 /* 0x0.c238d2311e7d08001 */,
0.759707318837184453227 /* 0x0.c27c2dc8f00368005 */,
0.760736509456435783249 /* 0x0.c2bfa0bcfd1400000 */,
0.761767094336480043995 /* 0x0.c3032b155818d0000 */,
0.762799075372231349951 /* 0x0.c346ccda248cc0001 */,
0.763832454453522768941 /* 0x0.c38a8613805488005 */,
0.764867233473625618441 /* 0x0.c3ce56c98d1ca8005 */,
0.765903414329434539816 /* 0x0.c4123f04708d80002 */,
0.766940998920452976510 /* 0x0.c4563ecc532dc0001 */,
0.767979989148100838946 /* 0x0.c49a56295f9f88006 */,
0.769020386915772125040 /* 0x0.c4de8523c2b0a0001 */,
0.770062194131770905170 /* 0x0.c522cbc3ae94e0003 */,
0.771105412703856241146 /* 0x0.c5672a1154e6b8004 */,
0.772150044545352520777 /* 0x0.c5aba014ed5f18003 */,
0.773196091570364285606 /* 0x0.c5f02dd6b09288003 */,
0.774243555696622731700 /* 0x0.c634d35edb1260003 */,
0.775292438842697939641 /* 0x0.c67990b5aa5c18004 */,
0.776342742931542928455 /* 0x0.c6be65e360bed8000 */,
0.777394469888802008854 /* 0x0.c70352f0437f50004 */,
0.778447621641124243320 /* 0x0.c74857e498fd00006 */,
0.779502200118583399303 /* 0x0.c78d74c8ab5b60000 */,
0.780558207255445668515 /* 0x0.c7d2a9a4c959f8000 */,
0.781615644985491186966 /* 0x0.c817f681412f80002 */,
0.782674515247667956808 /* 0x0.c85d5b6666c150006 */,
0.783734819983036512536 /* 0x0.c8a2d85c904760003 */,
0.784796561133562109454 /* 0x0.c8e86d6c14f850002 */,
0.785859740645942328471 /* 0x0.c92e1a9d513ec8002 */,
0.786924360469767103536 /* 0x0.c973dff8a4b390007 */,
0.787990422552312885808 /* 0x0.c9b9bd866c6440007 */,
0.789057928854407064640 /* 0x0.c9ffb34f1444b0001 */,
0.790126881326406182996 /* 0x0.ca45c15afcc570001 */,
0.791197281930050233534 /* 0x0.ca8be7b292db38000 */,
0.792269132620954885659 /* 0x0.cad2265e3cbee8000 */,
0.793342435380726906957 /* 0x0.cb187d667d3d38006 */,
0.794417192158282659010 /* 0x0.cb5eecd3b33158006 */,
0.795493404931386649540 /* 0x0.cba574ae5d2e80001 */,
0.796571075671306805268 /* 0x0.cbec14fef2a348004 */,
0.797650206352955137846 /* 0x0.cc32cdcdef0000000 */,
0.798730798954342069432 /* 0x0.cc799f23d11d18000 */,
0.799812855456121796232 /* 0x0.ccc089091abb28004 */,
0.800896377841454287795 /* 0x0.cd078b86505c18003 */,
0.801981368096190028208 /* 0x0.cd4ea6a3f97720007 */,
0.803067828208752554378 /* 0x0.cd95da6aa057b8007 */,
0.804155760170129796375 /* 0x0.cddd26e2d21b28001 */,
0.805245165974338261710 /* 0x0.ce248c151f3330001 */,
0.806336047619038653883 /* 0x0.ce6c0a0a1c1350001 */,
0.807428407102107836855 /* 0x0.ceb3a0ca5d6be0006 */,
0.808522246427078927792 /* 0x0.cefb505e7e2550007 */,
0.809617567597010201484 /* 0x0.cf4318cf18a268002 */,
0.810714372621179513182 /* 0x0.cf8afa24ce1c98004 */,
0.811812663508675536069 /* 0x0.cfd2f4683f9810005 */,
0.812912442272482604912 /* 0x0.d01b07a2126188003 */,
0.814013710929394895825 /* 0x0.d06333daeff618001 */,
0.815116471495287542325 /* 0x0.d0ab791b80d028006 */,
0.816220725993571205593 /* 0x0.d0f3d76c75b330000 */,
0.817326476447408967199 /* 0x0.d13c4ed67f1cf8000 */,
0.818433724883006474832 /* 0x0.d184df6250e3b0001 */,
0.819542473330909460055 /* 0x0.d1cd8918a3a328004 */,
0.820652723822034690935 /* 0x0.d2164c02305fa0002 */,
0.821764478391968422618 /* 0x0.d25f2827b53fb0005 */,
0.822877739077315761840 /* 0x0.d2a81d91f188b8000 */,
0.823992507918612782109 /* 0x0.d2f12c49a8d290005 */,
0.825108786960634610365 /* 0x0.d33a5457a35e40003 */,
0.826226578247117093869 /* 0x0.d38395c4a84848007 */,
0.827345883828319528258 /* 0x0.d3ccf09985d958004 */,
0.828466705754248966560 /* 0x0.d41664df0a1320005 */,
0.829589046080638992111 /* 0x0.d45ff29e094330000 */,
0.830712906863802391671 /* 0x0.d4a999df585a20005 */,
0.831838290163696481037 /* 0x0.d4f35aabd04a60006 */,
0.832965198041969556729 /* 0x0.d53d350c4be258002 */,
0.834093632565442222342 /* 0x0.d5872909aba050007 */,
0.835223595802037643865 /* 0x0.d5d136acd138e8006 */,
0.836355089820669306292 /* 0x0.d61b5dfe9f7780004 */,
0.837488116698010487424 /* 0x0.d6659f0801afa8005 */,
0.838622678508982644113 /* 0x0.d6aff9d1e147d8004 */,
0.839758777333464490056 /* 0x0.d6fa6e652d19e0000 */,
0.840896415254110962690 /* 0x0.d744fccad70d00003 */,
0.842035594355151628676 /* 0x0.d78fa50bd2c3b0000 */,
0.843176316724478125433 /* 0x0.d7da673117e730007 */,
0.844318584453106590905 /* 0x0.d8254343a19038003 */,
0.845462399634695271912 /* 0x0.d870394c6dbf30003 */,
0.846607764365415071965 /* 0x0.d8bb49547d37c0004 */,
0.847754680744707056494 /* 0x0.d9067364d45608003 */,
0.848903150873708822763 /* 0x0.d951b7867953b0006 */,
0.850053176859071113491 /* 0x0.d99d15c2787a30006 */,
0.851204760807439786431 /* 0x0.d9e88e21de11a0003 */,
0.852357904828824897169 /* 0x0.da3420adba1508003 */,
0.853512611037803181642 /* 0x0.da7fcd6f2184d8005 */,
0.854668881550406100980 /* 0x0.dacb946f2afaf8000 */,
0.855826718478671755185 /* 0x0.db1775b6e8ad48000 */,
0.856986123964844970247 /* 0x0.db63714f8e0818006 */,
0.858147100114499461478 /* 0x0.dbaf87422625b8000 */,
0.859309649060962410524 /* 0x0.dbfbb797daa460002 */,
0.860473772936213743282 /* 0x0.dc480259d3a710001 */,
0.861639473872910177676 /* 0x0.dc9467913a0f48006 */,
0.862806754008130227807 /* 0x0.dce0e7473b9b28003 */,
0.863975615481124226159 /* 0x0.dd2d8185086c20006 */,
0.865146060433749419813 /* 0x0.dd7a3653d38168005 */,
0.866318091005120138881 /* 0x0.ddc705bcccd628000 */,
0.867491709362415264210 /* 0x0.de13efc9434100004 */,
0.868666917636779056818 /* 0x0.de60f4825df9b8005 */,
0.869843717989716047624 /* 0x0.deae13f16599c0003 */,
0.871022112578215268471 /* 0x0.defb4e1f9dc388002 */,
0.872202103559697183859 /* 0x0.df48a3164a92f0001 */,
0.873383693097737778847 /* 0x0.df9612deb6e878007 */,
0.874566883362160263365 /* 0x0.dfe39d82348310001 */,
0.875751676517234511901 /* 0x0.e031430a0f0688000 */,
0.876938074732511840819 /* 0x0.e07f037f97e548001 */,
0.878126080186539592654 /* 0x0.e0ccdeec2a75e0006 */,
0.879315695055312818168 /* 0x0.e11ad5591f4078001 */,
0.880506921518618312932 /* 0x0.e168e6cfd2f880004 */,
0.881699761760385225541 /* 0x0.e1b71359a6df60003 */,
0.882894217964411143207 /* 0x0.e2055afffc1178000 */,
0.884090292325693805080 /* 0x0.e253bdcc3ffbb8001 */,
0.885287987031581180559 /* 0x0.e2a23bc7d7a1d8002 */,
0.886487304278189114386 /* 0x0.e2f0d4fc31ab80004 */,
0.887688246263368285778 /* 0x0.e33f8972bea8a8005 */,
0.888890815189881999840 /* 0x0.e38e5934f49010007 */,
0.890095013257492739835 /* 0x0.e3dd444c460bd0007 */,
0.891300842677948068626 /* 0x0.e42c4ac232f380000 */,
0.892508305659222567226 /* 0x0.e47b6ca036f8b8005 */,
0.893717404414979710310 /* 0x0.e4caa9efd40e58002 */,
0.894928141160697743242 /* 0x0.e51a02ba8e2610007 */,
0.896140518115016826430 /* 0x0.e5697709ecab90000 */,
0.897354537501434679237 /* 0x0.e5b906e77c61d0006 */,
0.898570201543732793877 /* 0x0.e608b25cca5ba8005 */,
0.899787512470129891014 /* 0x0.e6587973688ce8002 */,
0.901006472512270728537 /* 0x0.e6a85c34ecadb8000 */,
0.902227083902570559127 /* 0x0.e6f85aaaed4f20006 */,
0.903449348881299796343 /* 0x0.e74874df09a530003 */,
0.904673269686823378091 /* 0x0.e798aadadecba0007 */,
0.905898848559668845585 /* 0x0.e7e8fca80c3ee0001 */,
0.907126087750156795426 /* 0x0.e8396a503c3fe0005 */,
0.908354989505901100354 /* 0x0.e889f3dd1615b0002 */,
0.909585556079328783087 /* 0x0.e8da9958465228007 */,
0.910817789726044213523 /* 0x0.e92b5acb7d0578001 */,
0.912051692703457872481 /* 0x0.e97c38406c3c30003 */,
0.913287267274154990210 /* 0x0.e9cd31c0cbb370001 */,
0.914524515702244578108 /* 0x0.ea1e475654d540000 */,
0.915763440256158633982 /* 0x0.ea6f790ac5cc78001 */,
0.917004043205012497909 /* 0x0.eac0c6e7dd8448007 */,
0.918246326823137892807 /* 0x0.eb1230f760a428007 */,
0.919490293387826285200 /* 0x0.eb63b7431714a8007 */,
0.920735945178816406225 /* 0x0.ebb559d4cb6f30007 */,
0.921983284479243714322 /* 0x0.ec0718b64c0940002 */,
0.923232313574974705626 /* 0x0.ec58f3f16a3910002 */,
0.924483034755387955725 /* 0x0.ecaaeb8ffb3168005 */,
0.925735450311948926408 /* 0x0.ecfcff9bd67078000 */,
0.926989562542820610982 /* 0x0.ed4f301edad1a0007 */,
0.928245373740515189457 /* 0x0.eda17d22e0f9b0001 */,
0.929502886213858126045 /* 0x0.edf3e6b1d37d40001 */,
0.930762102264245716494 /* 0x0.ee466cd594c5c8005 */,
0.932023024199046146183 /* 0x0.ee990f980dcdb0005 */,
0.933285654329454095216 /* 0x0.eeebcf032bc470007 */,
0.934549994971191289044 /* 0x0.ef3eab20e0d3c0001 */,
0.935816048439005676599 /* 0x0.ef91a3fb1e1340004 */,
0.937083817055075818404 /* 0x0.efe4b99bdcc618006 */,
0.938353303143720007819 /* 0x0.f037ec0d1889b8000 */,
0.939624509028518128972 /* 0x0.f08b3b58cc2bb8006 */,
0.940897437041863904384 /* 0x0.f0dea788fc2a90000 */,
0.942172089516254085427 /* 0x0.f13230a7ad21b8003 */,
0.943448468787511540534 /* 0x0.f185d6bee754e0006 */,
0.944726577195256100890 /* 0x0.f1d999d8b73478005 */,
0.946006417082291717338 /* 0x0.f22d79ff2cb130000 */,
0.947287990793413858827 /* 0x0.f281773c59ec48007 */,
0.948571300678290207925 /* 0x0.f2d5919a566268001 */,
0.949856349088629370320 /* 0x0.f329c9233bceb0001 */,
0.951143138379053731954 /* 0x0.f37e1de1272068002 */,
0.952431670908847949364 /* 0x0.f3d28fde3a6728006 */,
0.953721949039916472305 /* 0x0.f4271f249a93f0001 */,
0.955013975135367898520 /* 0x0.f47bcbbe6deab0001 */,
0.956307751564417496418 /* 0x0.f4d095b5e16638004 */,
0.957603280698967163097 /* 0x0.f5257d1524f590006 */,
0.958900564911197350604 /* 0x0.f57a81e668d628000 */,
0.960199606581278120057 /* 0x0.f5cfa433e60e50007 */,
0.961500408088936442422 /* 0x0.f624e407d527a0007 */,
0.962802971817578789903 /* 0x0.f67a416c72b760006 */,
0.964107300155846558292 /* 0x0.f6cfbc6c011458004 */,
0.965413395493874504368 /* 0x0.f7255510c439a8002 */,
0.966721260225105960572 /* 0x0.f77b0b6503c5b8006 */,
0.968030896745834645873 /* 0x0.f7d0df730a7940005 */,
0.969342307458006424716 /* 0x0.f826d145294be8003 */,
0.970655494764855020231 /* 0x0.f87ce0e5b29fd8000 */,
0.971970461071268720958 /* 0x0.f8d30e5efaa8f0004 */,
0.973287208789983648852 /* 0x0.f92959bb5e3c08001 */,
0.974605740331924708124 /* 0x0.f97fc305383028004 */,
0.975926058115625383329 /* 0x0.f9d64a46ebb9f8004 */,
0.977248164559556209435 /* 0x0.fa2cef8adbfc68004 */,
0.978572062087848637573 /* 0x0.fa83b2db7253d0007 */,
0.979897753126343307191 /* 0x0.fada944319fda0005 */,
0.981225240104636631254 /* 0x0.fb3193cc425870002 */,
0.982554525455618277276 /* 0x0.fb88b1815e61d0003 */,
0.983885611617111077747 /* 0x0.fbdfed6ce683e0007 */,
0.985218501026348891812 /* 0x0.fc3747995282f8006 */,
0.986553196127724962867 /* 0x0.fc8ec0112202a0005 */,
0.987889699367056062238 /* 0x0.fce656ded63710002 */,
0.989228013193998778636 /* 0x0.fd3e0c0cf48d50005 */,
0.990568140061241164686 /* 0x0.fd95dfa605c7b0003 */,
0.991910082424819927754 /* 0x0.fdedd1b4965710004 */,
0.993253842749249660216 /* 0x0.fe45e2433bfea0000 */,
0.994599423484053835071 /* 0x0.fe9e115c7c05f0005 */,
0.995946827107488830167 /* 0x0.fef65f0afb4c28006 */,
0.997296056085008264529 /* 0x0.ff4ecb59509cc8001 */,
0.998647112892057764479 /* 0x0.ffa756521dbfd0007 */,
1.000000000000000000000 /* 0x1.00000000000000000 */,
1.001354719891689004659 /* 0x1.0058c86da14aa0005 */,
1.002711275050312211844 /* 0x1.00b1afa5abead0003 */,
1.004069667960743483835 /* 0x1.010ab5b2cc0660009 */,
1.005429901112333324093 /* 0x1.0163da9fb2af30008 */,
1.006791976999887428009 /* 0x1.01bd1e7716f6a0008 */,
1.008155898118476168101 /* 0x1.02168143b03890006 */,
1.009521666967782227439 /* 0x1.027003103ae320002 */,
1.010889286051850133326 /* 0x1.02c9a3e7783030002 */,
1.012258757875921233497 /* 0x1.032363d42aaa8000e */,
1.013630084952214405194 /* 0x1.037d42e11c88d0000 */,
1.015003269791313389451 /* 0x1.03d741191635a0001 */,
1.016378314911229763267 /* 0x1.04315e86e84630008 */,
1.017755222831652872635 /* 0x1.048b9b35652800002 */,
1.019133996077934645224 /* 0x1.04e5f72f65827000b */,
1.020514637175266248212 /* 0x1.0540727fc1cfa0006 */,
1.021897148653734488385 /* 0x1.059b0d3157ebb0002 */,
1.023281533050062419584 /* 0x1.05f5c74f0cfeb0002 */,
1.024667792897328677539 /* 0x1.0650a0e3c22ee0003 */,
1.026055930738840826806 /* 0x1.06ab99fa63e1b0008 */,
1.027445949118511947550 /* 0x1.0706b29ddf2700009 */,
1.028837850584049418178 /* 0x1.0761ead9253ab0009 */,
1.030231637685799839262 /* 0x1.07bd42b72a3f80008 */,
1.031627312979383592802 /* 0x1.0818ba42e824a000c */,
1.033024879021186448496 /* 0x1.0874518759b0b0008 */,
1.034424338374263729911 /* 0x1.08d0088f80ffa0006 */,
1.035825693601787333992 /* 0x1.092bdf66604e30005 */,
1.037228947273990842283 /* 0x1.0987d617019cd000a */,
1.038634101961269928846 /* 0x1.09e3ecac6f199000f */,
1.040041160239590700707 /* 0x1.0a402331b91270002 */,
1.041450124688240164200 /* 0x1.0a9c79b1f37c3000b */,
1.042860997889083929381 /* 0x1.0af8f038352160000 */,
1.044273782427270314011 /* 0x1.0b5586cf986890006 */,
1.045688480893644856116 /* 0x1.0bb23d833dfbf0006 */,
1.047105095879385272564 /* 0x1.0c0f145e46e330007 */,
1.048523629981608529302 /* 0x1.0c6c0b6bdaadc000f */,
1.049944085800634585634 /* 0x1.0cc922b72470a000f */,
1.051366465939483019223 /* 0x1.0d265a4b5238b0007 */,
1.052790773004648849929 /* 0x1.0d83b23395e510002 */,
1.054217009607077093512 /* 0x1.0de12a7b263970006 */,
1.055645178360430591625 /* 0x1.0e3ec32d3cf680000 */,
1.057075281882416506511 /* 0x1.0e9c7c55184f5000e */,
1.058507322794714378170 /* 0x1.0efa55fdfad51000a */,
1.059941303721639416236 /* 0x1.0f58503329fed0003 */,
1.061377227289284297385 /* 0x1.0fb66affed37f0000 */,
1.062815096132297298980 /* 0x1.1014a66f95540000c */,
1.064254912884593951029 /* 0x1.1073028d725850007 */,
1.065696680185205469411 /* 0x1.10d17f64d9ea2000b */,
1.067140400676658718053 /* 0x1.11301d012586a0007 */,
1.068586077004890055886 /* 0x1.118edb6db26ab0003 */,
1.070033711820396415998 /* 0x1.11edbab5e2d6e000b */,
1.071483307775789262099 /* 0x1.124cbae51b5ef0001 */,
1.072934867526001312439 /* 0x1.12abdc06c3240000c */,
1.074388393734249103080 /* 0x1.130b1e264a62e0005 */,
1.075843889063253344684 /* 0x1.136a814f20ccd0003 */,
1.077301356179926061823 /* 0x1.13ca058cbaaed000b */,
1.078760797756675327056 /* 0x1.1429aaea9260e000e */,
1.080222216468626150775 /* 0x1.148971742537c0009 */,
1.081685614993597610617 /* 0x1.14e95934f37e8000b */,
1.083150996013011013776 /* 0x1.1549623881762000d */,
1.084618362213087383633 /* 0x1.15a98c8a58a6a000b */,
1.086087716284427351384 /* 0x1.1609d8360768c0008 */,
1.087559060917626885283 /* 0x1.166a45471c13f0008 */,
1.089032398810997337465 /* 0x1.16cad3c92d7b50009 */,
1.090507732647478578212 /* 0x1.172b83c7c18b5000f */,
1.091985065182095926460 /* 0x1.178c554ead72a000c */,
1.093464399073070136880 /* 0x1.17ed48695befe000c */,
1.094945737045367906172 /* 0x1.184e5d23812500007 */,
1.096429081816546080591 /* 0x1.18af9388c90e40005 */,
1.097914436104650892651 /* 0x1.1910eba4e031a0001 */,
1.099401802629782043408 /* 0x1.19726583755720003 */,
1.100891184121537858001 /* 0x1.19d4013041b860007 */,
1.102382583308144647940 /* 0x1.1a35beb6fd0cd0007 */,
1.103876002922312915544 /* 0x1.1a979e2363fa10000 */,
1.105371445702084232160 /* 0x1.1af99f8139025000e */,
1.106868914387219016199 /* 0x1.1b5bc2dc408b9000e */,
1.108368411723785085252 /* 0x1.1bbe084045eb30002 */,
1.109869940458469095340 /* 0x1.1c206fb91524c000e */,
1.111373503344554869449 /* 0x1.1c82f952817cc0001 */,
1.112879103137133007859 /* 0x1.1ce5a51860344000f */,
1.114386742595953938610 /* 0x1.1d4873168babf000e */,
1.115896424484008608911 /* 0x1.1dab6358e1d4a000f */,
1.117408151567338414664 /* 0x1.1e0e75eb43f9c000c */,
1.118921926613465345265 /* 0x1.1e71aad995078000f */,
1.120437752409564780022 /* 0x1.1ed5022fcd8600003 */,
1.121955631720569668277 /* 0x1.1f387bf9cd88b0000 */,
1.123475567332998359439 /* 0x1.1f9c18438cdec000a */,
1.124997562033035469759 /* 0x1.1fffd71902f970002 */,
1.126521618608448571713 /* 0x1.2063b88629079000e */,
1.128047739853580200284 /* 0x1.20c7bc96ff72a0002 */,
1.129575928566289189112 /* 0x1.212be3578a81e0006 */,
1.131106187546149888259 /* 0x1.21902cd3d05f70007 */,
1.132638519598779369743 /* 0x1.21f49917ddda5000c */,
1.134172927531616359481 /* 0x1.2259282fc1c24000e */,
1.135709414157753949251 /* 0x1.22bdda27911e90007 */,
1.137247982292643566662 /* 0x1.2322af0b638e60007 */,
1.138788634756517259562 /* 0x1.2387a6e755f270000 */,
1.140331374372893558110 /* 0x1.23ecc1c788c890006 */,
1.141876203969685699176 /* 0x1.2451ffb821639000c */,
1.143423126377846266197 /* 0x1.24b760c5486dc0009 */,
1.144972144431494420774 /* 0x1.251ce4fb2a0cc0005 */,
1.146523260971646252006 /* 0x1.25828c65f9fb8000d */,
1.148076478839068270690 /* 0x1.25e85711ebaeb0000 */,
1.149631800883562204903 /* 0x1.264e450b3c8a30008 */,
1.151189229953253789786 /* 0x1.26b4565e281a20003 */,
1.152748768902654319399 /* 0x1.271a8b16f0f000002 */,
1.154310420590433317050 /* 0x1.2780e341de2fc0001 */,
1.155874187878668246681 /* 0x1.27e75eeb3abc90007 */,
1.157440073633736243899 /* 0x1.284dfe1f5633e000a */,
1.159008080725518974322 /* 0x1.28b4c0ea840d90001 */,
1.160578212048386514965 /* 0x1.291ba75932ae60000 */,
1.162150470417516290340 /* 0x1.2982b177796850008 */,
1.163724858777502646494 /* 0x1.29e9df51fdd900001 */,
1.165301379991388053320 /* 0x1.2a5130f50bf34000e */,
1.166880036952526289469 /* 0x1.2ab8a66d10fdc0008 */,
1.168460832550151540268 /* 0x1.2b203fc675b7a000a */,
1.170043769683112966389 /* 0x1.2b87fd0dad7260008 */,
1.171628851252754177681 /* 0x1.2befde4f2e3da000d */,
1.173216080163546060084 /* 0x1.2c57e397719940002 */,
1.174805459325657830448 /* 0x1.2cc00cf2f7491000c */,
1.176396991650083379037 /* 0x1.2d285a6e3ff90000b */,
1.177990680055698513602 /* 0x1.2d90cc15d4ff90005 */,
1.179586527463262646306 /* 0x1.2df961f641c57000c */,
1.181184536796979545103 /* 0x1.2e621c1c157cd000d */,
1.182784710984701836994 /* 0x1.2ecafa93e35af0004 */,
1.184387052960675701386 /* 0x1.2f33fd6a459cb0000 */,
1.185991565661414393112 /* 0x1.2f9d24abd8fd1000e */,
1.187598252026902612178 /* 0x1.300670653e083000a */,
1.189207115003001469262 /* 0x1.306fe0a31bc040008 */,
1.190818157535919796833 /* 0x1.30d9757219895000e */,
1.192431382587621380206 /* 0x1.31432edef01a1000f */,
1.194046793097208292195 /* 0x1.31ad0cf63f0630008 */,
1.195664392040319823392 /* 0x1.32170fc4ce0db000c */,
1.197284182375793593084 /* 0x1.32813757527750005 */,
1.198906167074650808198 /* 0x1.32eb83ba8eef3000f */,
1.200530349107333139048 /* 0x1.3355f4fb457e5000d */,
1.202156731453099647353 /* 0x1.33c08b2641df9000c */,
1.203785317090505513368 /* 0x1.342b46484f07b0005 */,
1.205416109005122526928 /* 0x1.3496266e3fa270005 */,
1.207049110184904572310 /* 0x1.35012ba4e8fa10000 */,
1.208684323627194912036 /* 0x1.356c55f92aabb0004 */,
1.210321752322854882437 /* 0x1.35d7a577dd33f0004 */,
1.211961399276747286580 /* 0x1.36431a2de8748000d */,
1.213603267492579629347 /* 0x1.36aeb4283309e000c */,
1.215247359985374142610 /* 0x1.371a7373b00160000 */,
1.216893679753690671322 /* 0x1.3786581d404e90000 */,
1.218542229828181611183 /* 0x1.37f26231e82e4000c */,
1.220193013225231215567 /* 0x1.385e91be9c2d20002 */,
1.221846032973555429280 /* 0x1.38cae6d05e66f0000 */,
1.223501292099485437962 /* 0x1.393761742e5830001 */,
1.225158793636904830441 /* 0x1.39a401b713cb3000e */,
1.226818540625497444577 /* 0x1.3a10c7a61ceae0007 */,
1.228480536107136034131 /* 0x1.3a7db34e5a4a50003 */,
1.230144783126481566885 /* 0x1.3aeac4bcdf8d60001 */,
1.231811284734168454619 /* 0x1.3b57fbfec6e950008 */,
1.233480043984379381835 /* 0x1.3bc559212e7a2000f */,
1.235151063936380300149 /* 0x1.3c32dc3139f2a0004 */,
1.236824347652524913647 /* 0x1.3ca0853c106ac000e */,
1.238499898199571624970 /* 0x1.3d0e544eddd240003 */,
1.240177718649636107175 /* 0x1.3d7c4976d3fcd0000 */,
1.241857812073360767273 /* 0x1.3dea64c1231f70004 */,
1.243540181554270152039 /* 0x1.3e58a63b099920005 */,
1.245224830175077013244 /* 0x1.3ec70df1c4e46000e */,
1.246911761022835740725 /* 0x1.3f359bf29741c000e */,
1.248600977188942806639 /* 0x1.3fa4504ac7b800009 */,
1.250292481770148400634 /* 0x1.40132b07a330d000a */,
1.251986277866492969263 /* 0x1.40822c367a340000b */,
1.253682368581898742876 /* 0x1.40f153e4a18e0000d */,
1.255380757024939564249 /* 0x1.4160a21f73289000d */,
1.257081446308726757662 /* 0x1.41d016f44deaa000c */,
1.258784439550028944083 /* 0x1.423fb27094c090008 */,
1.260489739869405489991 /* 0x1.42af74a1aec1c0006 */,
1.262197350394008266193 /* 0x1.431f5d950a453000c */,
1.263907274252603851764 /* 0x1.438f6d58176860004 */,
1.265619514578811388761 /* 0x1.43ffa3f84b9eb000d */,
1.267334074511444086425 /* 0x1.44700183221180008 */,
1.269050957191869555296 /* 0x1.44e0860618b930006 */,
1.270770165768063009230 /* 0x1.4551318eb4d20000e */,
1.272491703389059036805 /* 0x1.45c2042a7cc26000b */,
1.274215573211836316547 /* 0x1.4632fde6ffacd000d */,
1.275941778396075143580 /* 0x1.46a41ed1cfac40001 */,
1.277670322103555911043 /* 0x1.471566f8812ac0000 */,
1.279401207505722393185 /* 0x1.4786d668b33260005 */,
1.281134437771823675369 /* 0x1.47f86d3002637000a */,
1.282870016078732078362 /* 0x1.486a2b5c13c00000e */,
1.284607945607987078432 /* 0x1.48dc10fa916bd0004 */,
1.286348229545787758022 /* 0x1.494e1e192aaa30007 */,
1.288090871080605159846 /* 0x1.49c052c5913df000c */,
1.289835873406902644341 /* 0x1.4a32af0d7d8090002 */,
1.291583239722392528754 /* 0x1.4aa532feab5e10002 */,
1.293332973229098792374 /* 0x1.4b17dea6db8010008 */,
1.295085077135345708087 /* 0x1.4b8ab213d57d9000d */,
1.296839554650994097442 /* 0x1.4bfdad53629e10003 */,
1.298596408992440220988 /* 0x1.4c70d0735358a000d */,
1.300355643380135983739 /* 0x1.4ce41b817c99e0001 */,
1.302117261036232376282 /* 0x1.4d578e8bb52cb0003 */,
1.303881265192249561154 /* 0x1.4dcb299fde2920008 */,
1.305647659079073541490 /* 0x1.4e3eeccbd7f4c0003 */,
1.307416445934474813521 /* 0x1.4eb2d81d8a86f000b */,
1.309187629001237640529 /* 0x1.4f26eba2e35a5000e */,
1.310961211525240921493 /* 0x1.4f9b2769d35090009 */,
1.312737196755087820678 /* 0x1.500f8b804e4a30000 */,
1.314515587949291131086 /* 0x1.508417f4530d00009 */,
1.316296388365203462468 /* 0x1.50f8ccd3df1840003 */,
1.318079601265708777911 /* 0x1.516daa2cf60020002 */,
1.319865229921343141607 /* 0x1.51e2b00da3c2b0007 */,
1.321653277603506371251 /* 0x1.5257de83f5512000d */,
1.323443747588034513690 /* 0x1.52cd359dfc7d5000e */,
1.325236643161341820781 /* 0x1.5342b569d6baa000f */,
1.327031967602244177939 /* 0x1.53b85df59921b0000 */,
1.328829724206201046165 /* 0x1.542e2f4f6b17e0006 */,
1.330629916266568235675 /* 0x1.54a4298571b27000e */,
1.332432547083447937938 /* 0x1.551a4ca5d97190009 */,
1.334237619959296017340 /* 0x1.559098bed16bf0008 */,
1.336045138203900251029 /* 0x1.56070dde90c800000 */,
1.337855105129210686631 /* 0x1.567dac13510cd0009 */,
1.339667524053662184301 /* 0x1.56f4736b52e2c000c */,
1.341482398296830025383 /* 0x1.576b63f4d8333000f */,
1.343299731186792467254 /* 0x1.57e27dbe2c40e0003 */,
1.345119526053918823702 /* 0x1.5859c0d59cd37000f */,
1.346941786233264881662 /* 0x1.58d12d497cd9a0005 */,
1.348766515064854010261 /* 0x1.5948c32824b87000c */,
1.350593715891792223641 /* 0x1.59c0827ff03890007 */,
1.352423392064920459908 /* 0x1.5a386b5f43a3e0006 */,
1.354255546937278120764 /* 0x1.5ab07dd485af1000c */,
1.356090183865519494030 /* 0x1.5b28b9ee21085000f */,
1.357927306213322804534 /* 0x1.5ba11fba8816e000b */,
1.359766917346459269620 /* 0x1.5c19af482f8f2000f */,
1.361609020638567812980 /* 0x1.5c9268a594cc00004 */,
1.363453619463660171403 /* 0x1.5d0b4be135916000c */,
1.365300717204201985683 /* 0x1.5d84590998eeb0005 */,
1.367150317245710233754 /* 0x1.5dfd902d494e40001 */,
1.369002422974674892971 /* 0x1.5e76f15ad22c40008 */,
1.370857037789471544224 /* 0x1.5ef07ca0cc166000b */,
1.372714165088220639199 /* 0x1.5f6a320dcf5280006 */,
1.374573808273481745378 /* 0x1.5fe411b0790800009 */,
1.376435970755022220096 /* 0x1.605e1b976e4b1000e */,
1.378300655944092456600 /* 0x1.60d84fd155d15000e */,
1.380167867259843417228 /* 0x1.6152ae6cdf0030003 */,
1.382037608124419003675 /* 0x1.61cd3778bc879000d */,
1.383909881963391264069 /* 0x1.6247eb03a4dc40009 */,
1.385784692209972801544 /* 0x1.62c2c91c56d9b0002 */,
1.387662042298923203992 /* 0x1.633dd1d1930ec0001 */,
1.389541935670444372533 /* 0x1.63b90532200630004 */,
1.391424375772021271329 /* 0x1.6434634ccc4cc0007 */,
1.393309366052102982208 /* 0x1.64afec30677e90008 */,
1.395196909966106124701 /* 0x1.652b9febc8e0f000d */,
1.397087010973788290271 /* 0x1.65a77e8dcc7f10004 */,
1.398979672539331309267 /* 0x1.66238825534170000 */,
1.400874898129892187656 /* 0x1.669fbcc1415600008 */,
1.402772691220124823310 /* 0x1.671c1c708328e000a */,
1.404673055288671035301 /* 0x1.6798a7420988b000d */,
1.406575993818903302975 /* 0x1.68155d44ca77a000f */,
1.408481510297352468121 /* 0x1.68923e87bf70e000a */,
1.410389608216942924956 /* 0x1.690f4b19e8f74000c */,
1.412300291075172076232 /* 0x1.698c830a4c94c0008 */
};
#define S (1.0/4503599627370496.0) /* 2^-52 */
static const float exp2_deltatable[512] = {
11527*S, -963*S, 884*S, -781*S, -2363*S, -3441*S, 123*S, 526*S,
-6*S, 1254*S, -1138*S, 1519*S, 1576*S, -65*S, 1040*S, 793*S,
-1662*S, -5063*S, -387*S, 968*S, -941*S, 984*S, -2856*S, -545*S,
495*S, -5246*S, -2109*S, 1281*S, 2075*S, 909*S, -1642*S,-78233*S,
-31653*S, -265*S, 130*S, 430*S, 2482*S, -742*S, 1616*S, -2213*S,
-519*S, 20*S, -3134*S,-13981*S, 1343*S, -1740*S, 247*S, 1679*S,
-1097*S, 3131*S, 871*S, -1480*S, 1936*S, -1827*S, 17325*S, 528*S,
-322*S, 1404*S, -152*S, -1845*S, -212*S, 2639*S, -476*S, 2960*S,
-962*S, -1012*S, -1231*S, 3030*S, 1659*S, -486*S, 2154*S, 1728*S,
-2793*S, 699*S, -1560*S, -2125*S, 2156*S, 142*S, -1888*S, 4426*S,
-13443*S, 1970*S, -50*S, 1771*S,-43399*S, 4979*S, -2448*S, -370*S,
1414*S, 1075*S, 232*S, 206*S, 873*S, 2141*S, 2970*S, 1279*S,
-2331*S, 336*S, -2595*S, 753*S, -3384*S, -616*S, 89*S, -818*S,
5755*S, -241*S, -528*S, -661*S, -3777*S, -354*S, 250*S, 3881*S,
2632*S, -2131*S, 2565*S, -316*S, 1746*S, -2541*S, -1324*S, -50*S,
2564*S, -782*S, 1176*S, 6452*S, -1002*S, 1288*S, 336*S, -185*S,
3063*S, 3784*S, 2169*S, 686*S, 328*S, -400*S, 312*S, -4517*S,
-1457*S, 1046*S, -1530*S, -685*S, 1328*S,-49815*S, -895*S, 1063*S,
-2091*S, -672*S, -1710*S, -665*S, 1545*S, 1819*S,-45265*S, 3548*S,
-554*S, -568*S, 4752*S, -1907*S,-13738*S, 675*S, 9611*S, -1115*S,
-815*S, 408*S, -1281*S, -937*S,-16376*S, -4772*S, -1440*S, 992*S,
788*S, 10364*S, -1602*S, -661*S, -1783*S, -265*S, -20*S, -3781*S,
-861*S, -345*S, -994*S, 1364*S, -5339*S, 1620*S, 9390*S, -1066*S,
-305*S, -170*S, 175*S, 2461*S, -490*S, -769*S, -1450*S, 3315*S,
2418*S, -45*S, -852*S, -1295*S, -488*S, -96*S, 1142*S, -2639*S,
7905*S, -9306*S, -3859*S, 760*S, 1057*S, -1570*S, 3977*S, 209*S,
-514*S, 7151*S, 1646*S, 627*S, 599*S, -774*S, -1468*S, 633*S,
-473*S, 851*S, 2406*S, 143*S, 74*S, 4260*S, 1177*S, -913*S,
2670*S, -3298*S, -1662*S, -120*S, -3264*S, -2148*S, 410*S, 2078*S,
-2098*S, -926*S, 3580*S, -1289*S, 2450*S, -1158*S, 907*S, -590*S,
986*S, 1801*S, 1145*S, -1677*S, 3455*S, 956*S, 710*S, 144*S,
153*S, -255*S, -1898*S, 28102*S, 2748*S, 1194*S, -3009*S, 7076*S,
0*S, -2720*S, 711*S, 1225*S, -3034*S, -473*S, 378*S, -1046*S,
962*S, -2006*S, 4647*S, 3206*S, 1769*S, -2665*S, 1254*S, 2025*S,
-2430*S, 6193*S, 1224*S, -856*S, -1592*S, -325*S, -1521*S, 1827*S,
-264*S, 2403*S, -1065*S, 967*S, -681*S, -2106*S, -474*S, 1333*S,
-893*S, 2296*S, 592*S, -1220*S, -326*S, 990*S, 139*S, 206*S,
-779*S, -1683*S, 1238*S, 6098*S, 136*S, 1197*S, 790*S, -107*S,
-1004*S, -2449*S, 939*S, 5568*S, 156*S, 1812*S, 2792*S, -1094*S,
-2677*S, -251*S, 2297*S, 943*S, -1329*S, 2883*S, -853*S, -2626*S,
-105929*S, -6552*S, 1095*S, -1508*S, 1003*S, 5039*S, -2600*S, -749*S,
1790*S, 890*S, 2016*S, -1073*S, 624*S, -2084*S, -1536*S, -1330*S,
358*S, 2444*S, -179*S,-25759*S, -243*S, -552*S, -124*S, 3766*S,
1192*S, -1614*S, 6*S, -1227*S, 345*S, -981*S, -295*S, -1006*S,
-995*S, -1195*S, 706*S, 2512*S, -1758*S, -734*S, -6286*S, -922*S,
1530*S, 1542*S, 1223*S, 61*S, -83*S, 522*S,116937*S, -914*S,
-418*S, -7339*S, 249*S, -520*S, -762*S, 426*S, -505*S, 2664*S,
-1093*S, -1035*S, 2130*S, 4878*S, 1982*S, 1551*S, 2304*S, 193*S,
1532*S, -7268*S, 24357*S, 531*S, 2676*S, -1170*S, 1465*S, -1917*S,
2143*S, 1466*S, -7*S, -7300*S, 3297*S, -1197*S, -289*S, -1548*S,
26226*S, 4401*S, 4123*S, -1588*S, 4243*S, 4069*S, -1276*S, -2010*S,
1407*S, 1478*S, 488*S, -2366*S, -2909*S, -2534*S, -1285*S, 7095*S,
-645*S, -2089*S, -944*S, -40*S, -1363*S, -833*S, 917*S, 1609*S,
1286*S, 1677*S, 1613*S, -2295*S, -1248*S, 40*S, 26*S, 2038*S,
698*S, 2675*S, -1755*S, -3522*S, -1614*S, -6111*S, 270*S, 1822*S,
-234*S, -2844*S, -1201*S, -830*S, 1193*S, 2354*S, 47*S, 1522*S,
-78*S, -640*S, 2425*S, -1596*S, 1563*S, 1169*S, -1006*S, -83*S,
2362*S, -3521*S, -314*S, 1814*S, -1751*S, 305*S, 1715*S, -3741*S,
7847*S, 1291*S, 1206*S, 36*S, 1397*S, -1419*S, -1194*S, -2014*S,
1742*S, -578*S, -207*S, 875*S, 1539*S, 2826*S, -1165*S, -909*S,
1849*S, 927*S, 2018*S, -981*S, 1637*S, -463*S, 905*S, 6618*S,
400*S, 630*S, 2614*S, 900*S, 2323*S, -1094*S, -1858*S, -212*S,
-2069*S, 747*S, 1845*S, -1450*S, 444*S, -213*S, -438*S, 1158*S,
4738*S, 2497*S, -370*S, -2016*S, -518*S, -1160*S, -1510*S, 123*S
};
/* Maximum magnitude in above table: 116937 */
#undef S

View file

@ -1,70 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:uasncs.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef UANSNCS_H
#define UANSNCS_H
#ifdef BIG_ENDI
static const mynumber
/**/ a1 = {{0x3FC55580, 0x00000000 }}, /* 0.1666717529296875 */
/**/ a2 = {{0xBED55555, 0x55552330 }}, /* -5.0862630208224597e-06 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18 }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07 }}; /* 6.123233995736766e-17 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ a1 = {{0x00000000, 0x3FC55580 }}, /* 0.1666717529296875 */
/**/ a2 = {{0x55552330, 0xBED55555 }}, /* -5.0862630208224597e-06 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626 }}; /* 6.123233995736766e-17 */
#endif
#endif
static const double
f1 = 1.66666666666664110590506577996662E-01,
f2 = 7.50000000026122686814431784722623E-02,
f3 = 4.46428561421059750978517350006940E-02,
f4 = 3.03821268582119319911193410625235E-02,
f5 = 2.23551211026525610742786300334557E-02,
f6 = 1.81382903404565056280372531963613E-02;
static const double
c2 = 0.74999999999985410757087492918602258E-01,
c3 = 0.44642857150311968932423372477866076E-01,
c4 = 0.30381942574778615766200591683810471E-01,
c5 = 0.22372413472984868331447708777000650E-01,
c6 = 0.17333630246451830686009693735025490E-01,
c7 = 0.14710362893628210269950864741085777E-01;
static const double big = 103079215104.0, t24 = 16777216.0, t27 = 134217728.0;
static const double
rt0 = 9.99999999859990725855365213134618E-01,
rt1 = 4.99999999495955425917856814202739E-01,
rt2 = 3.75017500867345182581453026130850E-01,
rt3 = 3.12523626554518656309172508769531E-01;
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,70 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:uexp.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef UEXP_H
#define UEXP_H
#include "mydefs.h"
const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
err_0 = 1.000014, err_1 = 0.000016;
const static int4 bigint = 0x40862002,
badint = 0x40876000,smallint = 0x3C8fffff;
const static int4 hugeint = 0x7FFFFFFF, infint = 0x7ff00000;
#ifdef BIG_ENDI
const static mynumber inf = {{0x7FF00000, 0}}; /* inf */
const static mynumber t256 = {{0x4ff00000, 0}}; /* 2^256 */
const static mynumber ln_two1 = {{0x3FE62E42, 0xFEFA3800}};/*0.69314718055989033 */
const static mynumber ln_two2 = {{0x3D2EF357, 0x93C76730}};/*5.4979230187083712e-14*/
const static mynumber log2e = {{0x3FF71547, 0x652B82FE}};/* 1.4426950408889634 */
const static mynumber p2 = {{0x3FE00000, 0x000004DC}};/* 0.50000000000013811 */
const static mynumber p3 = {{0x3FC55555, 0x55555A0F}};/* 0.16666666666670024 */
const static mynumber three33 = {{0x42180000, 0}}; /* 25769803776 */
const static mynumber three51 = {{0x43380000, 0}}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
const static mynumber inf = {{0, 0x7FF00000}}; /* inf */
const static mynumber t256 = {{0, 0x4ff00000}}; /* 2^256 */
const static mynumber ln_two1 = {{0xFEFA3800, 0x3FE62E42}};/*0.69314718055989033 */
const static mynumber ln_two2 = {{0x93C76730, 0x3D2EF357}};/*5.4979230187083712e-14*/
const static mynumber log2e = {{0x652B82FE, 0x3FF71547}};/* 1.4426950408889634 */
const static mynumber p2 = {{0x000004DC, 0x3FE00000}};/* 0.50000000000013811 */
const static mynumber p3 = {{0x55555A0F, 0x3FC55555}};/* 0.16666666666670024 */
const static mynumber three33 = {{0, 0x42180000}}; /* 25769803776 */
const static mynumber three51 = {{0, 0x43380000}}; /* 6755399441055744 */
#endif
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,200 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:ulog.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef ULOG_H
#define ULOG_H
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ a2 = {{0xbfe00000, 0x0001aa8f} }, /* -0.500... */
/**/ a3 = {{0x3fd55555, 0x55588d2e} }, /* 0.333... */
/* polynomial II */
/**/ b0 = {{0x3fd55555, 0x55555555} }, /* 0.333... */
/**/ b1 = {{0xbfcfffff, 0xffffffbb} }, /* -0.249... */
/**/ b2 = {{0x3fc99999, 0x9999992f} }, /* 0.199... */
/**/ b3 = {{0xbfc55555, 0x556503fd} }, /* -0.166... */
/**/ b4 = {{0x3fc24924, 0x925b3d62} }, /* 0.142... */
/**/ b5 = {{0xbfbffffe, 0x160472fc} }, /* -0.124... */
/**/ b6 = {{0x3fbc71c5, 0x25db58ac} }, /* 0.111... */
/**/ b7 = {{0xbfb9a4ac, 0x11a2a61c} }, /* -0.100... */
/**/ b8 = {{0x3fb75077, 0x0df2b591} }, /* 0.091... */
/* polynomial III */
#if 0
/**/ c1 = {{0x3ff00000, 0x00000000} }, /* 1 */
#endif
/**/ c2 = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ c3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ c4 = {{0xbfd00000, 0x00000000} }, /* -1/4 */
/**/ c5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/* polynomial IV */
/**/ d2 = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ dd2 = {{0x00000000, 0x00000000} }, /* -1/2-d2 */
/**/ d3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ dd3 = {{0x3c755555, 0x55555555} }, /* 1/3-d3 */
/**/ d4 = {{0xbfd00000, 0x00000000} }, /* -1/4 */
/**/ dd4 = {{0x00000000, 0x00000000} }, /* -1/4-d4 */
/**/ d5 = {{0x3fc99999, 0x9999999a} }, /* 1/5 */
/**/ dd5 = {{0xbc699999, 0x9999999a} }, /* 1/5-d5 */
/**/ d6 = {{0xbfc55555, 0x55555555} }, /* -1/6 */
/**/ dd6 = {{0xbc655555, 0x55555555} }, /* -1/6-d6 */
/**/ d7 = {{0x3fc24924, 0x92492492} }, /* 1/7 */
/**/ dd7 = {{0x3c624924, 0x92492492} }, /* 1/7-d7 */
/**/ d8 = {{0xbfc00000, 0x00000000} }, /* -1/8 */
/**/ dd8 = {{0x00000000, 0x00000000} }, /* -1/8-d8 */
/**/ d9 = {{0x3fbc71c7, 0x1c71c71c} }, /* 1/9 */
/**/ dd9 = {{0x3c5c71c7, 0x1c71c71c} }, /* 1/9-d9 */
/**/ d10 = {{0xbfb99999, 0x9999999a} }, /* -1/10 */
/**/ dd10 = {{0x3c599999, 0x9999999a} }, /* -1/10-d10 */
/**/ d11 = {{0x3fb745d1, 0x745d1746} }, /* 1/11 */
/**/ d12 = {{0xbfb55555, 0x55555555} }, /* -1/12 */
/**/ d13 = {{0x3fb3b13b, 0x13b13b14} }, /* 1/13 */
/**/ d14 = {{0xbfb24924, 0x92492492} }, /* -1/14 */
/**/ d15 = {{0x3fb11111, 0x11111111} }, /* 1/15 */
/**/ d16 = {{0xbfb00000, 0x00000000} }, /* -1/16 */
/**/ d17 = {{0x3fae1e1e, 0x1e1e1e1e} }, /* 1/17 */
/**/ d18 = {{0xbfac71c7, 0x1c71c71c} }, /* -1/18 */
/**/ d19 = {{0x3faaf286, 0xbca1af28} }, /* 1/19 */
/**/ d20 = {{0xbfa99999, 0x9999999a} }, /* -1/20 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ half = {{0x3fe00000, 0x00000000} }, /* 1/2 */
/**/ mhalf = {{0xbfe00000, 0x00000000} }, /* -1/2 */
/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc} }, /* sqrt(2) */
/**/ h1 = {{0x3fd2e000, 0x00000000} }, /* 151/2**9 */
/**/ h2 = {{0x3f669000, 0x00000000} }, /* 361/2**17 */
/**/ delu = {{0x3f700000, 0x00000000} }, /* 1/2**8 */
/**/ delv = {{0x3ef00000, 0x00000000} }, /* 1/2**16 */
/**/ ln2a = {{0x3fe62e42, 0xfefa3800} }, /* ln(2) 43 bits */
/**/ ln2b = {{0x3d2ef357, 0x93c76730} }, /* ln(2)-ln2a */
/**/ e1 = {{0x3bbcc868, 0x00000000} }, /* 6.095e-21 */
/**/ e2 = {{0x3c1138ce, 0x00000000} }, /* 2.334e-19 */
/**/ e3 = {{0x3aa1565d, 0x00000000} }, /* 2.801e-26 */
/**/ e4 = {{0x39809d88, 0x00000000} }, /* 1.024e-31 */
/**/ e[M] ={{{0x37da223a, 0x00000000} }, /* 1.2e-39 */
/**/ {{0x35c851c4, 0x00000000} }, /* 1.3e-49 */
/**/ {{0x2ab85e51, 0x00000000} }, /* 6.8e-103 */
/**/ {{0x17383827, 0x00000000} }},/* 8.1e-197 */
/**/ two54 = {{0x43500000, 0x00000000} }, /* 2**54 */
/**/ u03 = {{0x3f9eb851, 0xeb851eb8} }; /* 0.03 */
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ a2 = {{0x0001aa8f, 0xbfe00000} }, /* -0.500... */
/**/ a3 = {{0x55588d2e, 0x3fd55555} }, /* 0.333... */
/* polynomial II */
/**/ b0 = {{0x55555555, 0x3fd55555} }, /* 0.333... */
/**/ b1 = {{0xffffffbb, 0xbfcfffff} }, /* -0.249... */
/**/ b2 = {{0x9999992f, 0x3fc99999} }, /* 0.199... */
/**/ b3 = {{0x556503fd, 0xbfc55555} }, /* -0.166... */
/**/ b4 = {{0x925b3d62, 0x3fc24924} }, /* 0.142... */
/**/ b5 = {{0x160472fc, 0xbfbffffe} }, /* -0.124... */
/**/ b6 = {{0x25db58ac, 0x3fbc71c5} }, /* 0.111... */
/**/ b7 = {{0x11a2a61c, 0xbfb9a4ac} }, /* -0.100... */
/**/ b8 = {{0x0df2b591, 0x3fb75077} }, /* 0.091... */
/* polynomial III */
#if 0
/**/ c1 = {{0x00000000, 0x3ff00000} }, /* 1 */
#endif
/**/ c2 = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ c3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ c4 = {{0x00000000, 0xbfd00000} }, /* -1/4 */
/**/ c5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/* polynomial IV */
/**/ d2 = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ dd2 = {{0x00000000, 0x00000000} }, /* -1/2-d2 */
/**/ d3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ dd3 = {{0x55555555, 0x3c755555} }, /* 1/3-d3 */
/**/ d4 = {{0x00000000, 0xbfd00000} }, /* -1/4 */
/**/ dd4 = {{0x00000000, 0x00000000} }, /* -1/4-d4 */
/**/ d5 = {{0x9999999a, 0x3fc99999} }, /* 1/5 */
/**/ dd5 = {{0x9999999a, 0xbc699999} }, /* 1/5-d5 */
/**/ d6 = {{0x55555555, 0xbfc55555} }, /* -1/6 */
/**/ dd6 = {{0x55555555, 0xbc655555} }, /* -1/6-d6 */
/**/ d7 = {{0x92492492, 0x3fc24924} }, /* 1/7 */
/**/ dd7 = {{0x92492492, 0x3c624924} }, /* 1/7-d7 */
/**/ d8 = {{0x00000000, 0xbfc00000} }, /* -1/8 */
/**/ dd8 = {{0x00000000, 0x00000000} }, /* -1/8-d8 */
/**/ d9 = {{0x1c71c71c, 0x3fbc71c7} }, /* 1/9 */
/**/ dd9 = {{0x1c71c71c, 0x3c5c71c7} }, /* 1/9-d9 */
/**/ d10 = {{0x9999999a, 0xbfb99999} }, /* -1/10 */
/**/ dd10 = {{0x9999999a, 0x3c599999} }, /* -1/10-d10 */
/**/ d11 = {{0x745d1746, 0x3fb745d1} }, /* 1/11 */
/**/ d12 = {{0x55555555, 0xbfb55555} }, /* -1/12 */
/**/ d13 = {{0x13b13b14, 0x3fb3b13b} }, /* 1/13 */
/**/ d14 = {{0x92492492, 0xbfb24924} }, /* -1/14 */
/**/ d15 = {{0x11111111, 0x3fb11111} }, /* 1/15 */
/**/ d16 = {{0x00000000, 0xbfb00000} }, /* -1/16 */
/**/ d17 = {{0x1e1e1e1e, 0x3fae1e1e} }, /* 1/17 */
/**/ d18 = {{0x1c71c71c, 0xbfac71c7} }, /* -1/18 */
/**/ d19 = {{0xbca1af28, 0x3faaf286} }, /* 1/19 */
/**/ d20 = {{0x9999999a, 0xbfa99999} }, /* -1/20 */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ half = {{0x00000000, 0x3fe00000} }, /* 1/2 */
/**/ mhalf = {{0x00000000, 0xbfe00000} }, /* -1/2 */
/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e} }, /* sqrt(2) */
/**/ h1 = {{0x00000000, 0x3fd2e000} }, /* 151/2**9 */
/**/ h2 = {{0x00000000, 0x3f669000} }, /* 361/2**17 */
/**/ delu = {{0x00000000, 0x3f700000} }, /* 1/2**8 */
/**/ delv = {{0x00000000, 0x3ef00000} }, /* 1/2**16 */
/**/ ln2a = {{0xfefa3800, 0x3fe62e42} }, /* ln(2) 43 bits */
/**/ ln2b = {{0x93c76730, 0x3d2ef357} }, /* ln(2)-ln2a */
/**/ e1 = {{0x00000000, 0x3bbcc868} }, /* 6.095e-21 */
/**/ e2 = {{0x00000000, 0x3c1138ce} }, /* 2.334e-19 */
/**/ e3 = {{0x00000000, 0x3aa1565d} }, /* 2.801e-26 */
/**/ e4 = {{0x00000000, 0x39809d88} }, /* 1.024e-31 */
/**/ e[M] ={{{0x00000000, 0x37da223a} }, /* 1.2e-39 */
/**/ {{0x00000000, 0x35c851c4} }, /* 1.3e-49 */
/**/ {{0x00000000, 0x2ab85e51} }, /* 6.8e-103 */
/**/ {{0x00000000, 0x17383827} }},/* 8.1e-197 */
/**/ two54 = {{0x00000000, 0x43500000} }, /* 2**54 */
/**/ u03 = {{0xeb851eb8, 0x3f9eb851} }; /* 0.03 */
#endif
#endif
#define ZERO zero.d
#define ONE one.d
#define HALF half.d
#define MHALF mhalf.d
#define SQRT_2 sqrt_2.d
#define DEL_U delu.d
#define DEL_V delv.d
#define LN2A ln2a.d
#define LN2B ln2b.d
#define E1 e1.d
#define E2 e2.d
#define E3 e3.d
#define E4 e4.d
#define U03 u03.d
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,81 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:upow.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef UPOW_H
#define UPOW_H
#include "mydefs.h"
#ifdef BIG_ENDI
const static mynumber
/**/ nZERO = {{0x80000000, 0}}, /* -0.0 */
/**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */
/**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */
/**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */
/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */
/**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */
/**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */
/**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {{0x4207ffff, 0xfff8016a}}, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {{0x43300000, 0x00000000}}, /* 2**52 */
/**/ two52e = {{0x43300000, 0x000003ff}}; /* 2**52' */
#else
#ifdef LITTLE_ENDI
const static mynumber
/**/ nZERO = {{0, 0x80000000}}, /* -0.0 */
/**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */
/**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */
/**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */
/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */
/**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */
/**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */
/**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */
/**/ bigv = {{0xfff8016a, 0x4207ffff}}, /* 1.5*2**33-1+362*2**-19 */
/**/ t52 = {{0x00000000, 0x43300000}}, /* 2**52 */
/**/ two52e = {{0x000003ff, 0x43300000}}; /* 2**52' */
#endif
#endif
const static double p2=-0.5, p3 = 3.3333333333333333333e-1, p4 = -0.25,
q2 = -0.5, q3 = 3.3333333333331404e-01, q4 = -2.4999999999996436e-01,
q5 = 2.0000010500004459e-01, q6 = -1.6666678916688004e-01,
r3 = 3.33333333333333333372884096563030E-01,
r4 = -2.50000000000000000213574153875908E-01,
r5 = 1.99999999999683593814072199830603E-01,
r6 = -1.66666666666065494878165510225378E-01,
r7 = 1.42857517857114380606360005067609E-01,
r8 = -1.25000449999974370683775964001702E-01,
s3 = 0.333251953125000000e0,
ss3 = 8.138020833333333333e-05,
s4 = -2.500000000000000000e-01,
s5 = 1.999999999999960937e-01,
s6 = -1.666666666666592447e-01,
s7 = 1.428571845238194705e-01,
s8 = -1.250000500000149097e-01;
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,51 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: urem.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef UREM_H
#define UREM_H
#ifdef BIG_ENDI
static const mynumber big = {{0x43380000, 0}}, /* 6755399441055744 */
t128 = {{0x47f00000, 0}}, /* 2^ 128 */
tm128 = {{0x37f00000, 0}}, /* 2^-128 */
ZERO = {{0, 0}}, /* 0.0 */
nZERO = {{0x80000000, 0}}, /* -0.0 */
NAN = {{0x7ff80000, 0}}, /* NaN */
nNAN = {{0xfff80000, 0}}; /* -NaN */
#else
#ifdef LITTLE_ENDI
static const mynumber big = {{0, 0x43380000}}, /* 6755399441055744 */
t128 = {{0, 0x47f00000}}, /* 2^ 128 */
tm128 = {{0, 0x37f00000}}, /* 2^-128 */
ZERO = {{0, 0}}, /* 0.0 */
nZERO = {{0, 0x80000000}}, /* -0.0 */
NAN = {{0, 0x7ff80000}}, /* NaN */
nNAN = {{0, 0xfff80000}}; /* -NaN */
#endif
#endif
#endif

View file

@ -1,44 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:uroot.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef UROOT_H
#define UROOT_H
#ifdef BIG_ENDI
static const mynumber
/**/ t512 = {{0x5ff00000, 0x00000000 }}, /* 2^512 */
/**/ tm256 = {{0x2ff00000, 0x00000000 }}; /* 2^-256 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ t512 = {{0x00000000, 0x5ff00000 }}, /* 2^512 */
/**/ tm256 = {{0x00000000, 0x2ff00000 }}; /* 2^-256 */
#endif
#endif
#endif

View file

@ -1,80 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/************************************************************************/
/* MODULE_NAME: dosincos.h */
/* */
/* */
/* common data and variables definition for BIG or LITTLE ENDIAN */
/************************************************************************/
#ifndef USNCS_H
#define USNCS_H
#ifdef BIG_ENDI
static const mynumber
/**/ NAN = {{0x7ff80000, 0x00000000 }}, /* NaN */
/**/ s1 = {{0xBFC55555, 0x55555555 }}, /* -0.16666666666666666 */
/**/ s2 = {{0x3F811111, 0x11110ECE }}, /* 0.0083333333333323288 */
/**/ s3 = {{0xBF2A01A0, 0x19DB08B8 }}, /* -0.00019841269834414642 */
/**/ s4 = {{0x3EC71DE2, 0x7B9A7ED9 }}, /* 2.755729806860771e-06 */
/**/ s5 = {{0xBE5ADDFF, 0xC2FCDF59 }}, /* -2.5022014848318398e-08 */
/**/ aa = {{0xBFC55580, 0x00000000 }}, /* -0.1666717529296875 */
/**/ bb = {{0x3ED55555, 0x55556E24 }}, /* 5.0862630208387126e-06 */
/**/ big = {{0x42c80000, 0x00000000 }}, /* 52776558133248 */
/**/ hp0 = {{0x3FF921FB, 0x54442D18 }}, /* 1.5707963267948966 */
/**/ hp1 = {{0x3C91A626, 0x33145C07 }}, /* 6.123233995736766e-17 */
/**/ mp1 = {{0x3FF921FB, 0x58000000 }}, /* 1.5707963407039642 */
/**/ mp2 = {{0xBE4DDE97, 0x3C000000 }}, /* -1.3909067564377153e-08 */
/**/ mp3 = {{0xBC8CB3B3, 0x99D747F2 }}, /* -4.9789962505147994e-17 */
/**/ pp3 = {{0xBC8CB3B3, 0x98000000 }}, /* -4.9789962314799099e-17 */
/**/ pp4 = {{0xbacd747f, 0x23e32ed7 }}, /* -1.9034889620193266e-25 */
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883 }}, /* 0.63661977236758138 */
/**/ toint = {{0x43380000, 0x00000000 }}; /* 6755399441055744 */
#else
#ifdef LITTLE_ENDI
static const mynumber
/**/ NAN = {{0x00000000, 0x7ff80000 }},/* NaN */
/**/ s1 = {{0x55555555, 0xBFC55555 }},/* -0.16666666666666666 */
/**/ s2 = {{0x11110ECE, 0x3F811111 }},/* 0.0083333333333323288 */
/**/ s3 = {{0x19DB08B8, 0xBF2A01A0 }},/* -0.00019841269834414642 */
/**/ s4 = {{0x7B9A7ED9, 0x3EC71DE2 }},/* 2.755729806860771e-06 */
/**/ s5 = {{0xC2FCDF59, 0xBE5ADDFF }},/* -2.5022014848318398e-08 */
/**/ aa = {{0x00000000, 0xBFC55580 }},/* -0.1666717529296875 */
/**/ bb = {{0x55556E24, 0x3ED55555 }},/* 5.0862630208387126e-06 */
/**/ big = {{0x00000000, 0x42c80000 }},/* 52776558133248 */
/**/ hp0 = {{0x54442D18, 0x3FF921FB }},/* 1.5707963267948966 */
/**/ hp1 = {{0x33145C07, 0x3C91A626 }},/* 6.123233995736766e-17 */
/**/ mp1 = {{0x58000000, 0x3FF921FB }},/* 1.5707963407039642 */
/**/ mp2 = {{0x3C000000, 0xBE4DDE97 }},/* -1.3909067564377153e-08 */
/**/ mp3 = {{0x99D747F2, 0xBC8CB3B3 }},/* -4.9789962505147994e-17 */
/**/ pp3 = {{0x98000000, 0xBC8CB3B3 }},/* -4.9789962314799099e-17 */
/**/ pp4 = {{0x23e32ed7, 0xbacd747f }},/* -1.9034889620193266e-25 */
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30 }},/* 0.63661977236758138 */
/**/ toint = {{0x00000000, 0x43380000 }};/* 6755399441055744 */
#endif
#endif
#endif

View file

@ -1,280 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/******************************************************************/
/* */
/* MODULE_NAME:utan.h */
/* */
/* common data and variables prototype and definition */
/******************************************************************/
#ifndef UTAN_H
#define UTAN_H
#ifdef BIG_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0x3FD55555, 0x55555555} }, /* 0.333... */
/**/ d5 = {{0x3FC11111, 0x111107C6} }, /* 0.133... */
/**/ d7 = {{0x3FABA1BA, 0x1CDB8745} }, /* . */
/**/ d9 = {{0x3F9664ED, 0x49CFC666} }, /* . */
/**/ d11 = {{0x3F82385A, 0x3CF2E4EA} }, /* . */
/* polynomial II */
/**/ a3 = {{0x3fd55555, 0x55555555} }, /* 1/3 */
/**/ aa3 = {{0x3c755555, 0x55555555} }, /* 1/3-a3 */
/**/ a5 = {{0x3fc11111, 0x11111111} }, /* 2/15 */
/**/ aa5 = {{0x3c411111, 0x11111111} }, /* 2/15-a5 */
/**/ a7 = {{0x3faba1ba, 0x1ba1ba1c} }, /* 17/315 */
/**/ aa7 = {{0xbc479179, 0x17917918} }, /* ()-a7 */
/**/ a9 = {{0x3f9664f4, 0x882c10fa} }, /* 62/2835 */
/**/ aa9 = {{0xbc09a528, 0x8b6c44fd} }, /* ()-a9 */
/**/ a11 = {{0x3f8226e3, 0x55e6c23d} }, /* . */
/**/ aa11 = {{0xbc2c292b, 0x8f1a2c13} }, /* . */
/**/ a13 = {{0x3f6d6d3d, 0x0e157de0} }, /* . */
/**/ aa13 = {{0xbc0280cf, 0xc968d971} }, /* . */
/**/ a15 = {{0x3f57da36, 0x452b75e3} }, /* . */
#if 0
/**/ aa15 = {{0xbbf25789, 0xb285d2ed} }, /* . */
#endif
/**/ a17 = {{0x3f435582, 0x48036744} }, /* . */
#if 0
/**/ aa17 = {{0x3be488d9, 0x563f1f23} }, /* . */
#endif
/**/ a19 = {{0x3f2f57d7, 0x734d1664} }, /* . */
#if 0
/**/ aa19 = {{0x3bb0d55a, 0x913ccb50} }, /* . */
#endif
/**/ a21 = {{0x3f1967e1, 0x8afcafad} }, /* . */
#if 0
/**/ aa21 = {{0xbbbd7614, 0xa42d44e6} }, /* . */
#endif
/**/ a23 = {{0x3f0497d8, 0xeea25259} }, /* . */
#if 0
/**/ aa23 = {{0x3b99f2d0, 0x2e4d2863} }, /* . */
#endif
/**/ a25 = {{0x3ef0b132, 0xd39a6050} }, /* . */
#if 0
/**/ aa25 = {{0x3b93b274, 0xc2c19614} }, /* . */
#endif
/**/ a27 = {{0x3edb0f72, 0xd3ee24e9} }, /* . */
#if 0
/**/ aa27 = {{0x3b61688d, 0xdd595609} }, /* . */
#endif
/* polynomial III */
/**/ e0 = {{0x3FD55555, 0x55554DBD} }, /* . */
/**/ e1 = {{0x3FC11112, 0xE0A6B45F} }, /* . */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ mone = {{0xbff00000, 0x00000000} }, /*-1 */
/**/ mfftnhf = {{0xc02f0000, 0x00000000} }, /*-15.5 */
/**/ two8 = {{0x40700000, 0x00000000} }, /* 256 */
/**/ g1 = {{0x3e4b096c, 0x00000000} }, /* 1.259e-8 */
/**/ g2 = {{0x3faf212d, 0x00000000} }, /* 0.0608 */
/**/ g3 = {{0x3fe92f1a, 0x00000000} }, /* 0.787 */
/**/ g4 = {{0x40390000, 0x00000000} }, /* 25.0 */
/**/ g5 = {{0x4197d784, 0x00000000} }, /* 1e8 */
/**/ gy1 = {{0x3e7ad7f2, 0x9abcaf48} }, /* 1e-7 */
/**/ gy2 = {{0x3faf212d, 0x00000000} }, /* 0.0608 */
/**/ u1 = {{0x3cc8c33a, 0x00000000} }, /* 6.873e-16 */
/**/ u2 = {{0x3983dc4d, 0x00000000} }, /* 1.224e-31 */
/**/ u3 = {{0x3c78e14b, 0x00000000} }, /* 2.158e-17 */
/**/ ua3 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub3 = {{0x3cc81898, 0x00000000} }, /* 6.688e-16 */
/**/ u4 = {{0x399856c2, 0x00000000} }, /* 3e-31 */
/**/ u5 = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
/**/ u6 = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
/**/ u7 = {{0x39903beb, 0x00000000} }, /* 2.001e-31 */
/**/ u8 = {{0x399c56ae, 0x00000000} }, /* 3.493e-31 */
/**/ u9 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua9 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub9 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u10 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua10 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub10 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u11 = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
/**/ u12 = {{0x39e509b6, 0x00000000} }, /* 8.298e-30 */
/**/ u13 = {{0x3c39d80a, 0x00000000} }, /* 1.401e-18 */
/**/ u14 = {{0x3c374c5a, 0x00000000} }, /* 1.263e-18 */
/**/ u15 = {{0x3ab5767a, 0x00000000} }, /* 6.935e-26 */
/**/ u16 = {{0x3ab57744, 0x00000000} }, /* 6.936e-26 */
/**/ u17 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua17 = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
/**/ ub17 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u18 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua18 = {{0x3bfdb11f, 0x00000000} }, /* 1.006e-19 */
/**/ ub18 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u19 = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
/**/ u20 = {{0x39a13b61, 0x00000000} }, /* 4.248e-31 */
/**/ u21 = {{0x3c3bb9b8, 0x00000000} }, /* 1.503e-18 */
/**/ u22 = {{0x3c392e08, 0x00000000} }, /* 1.365e-18 */
/**/ u23 = {{0x3a0ce706, 0x00000000} }, /* 4.560e-29 */
/**/ u24 = {{0x3a0cff5d, 0x00000000} }, /* 4.575e-29 */
/**/ u25 = {{0x3c7d0ac7, 0x00000000} }, /* 2.519e-17 */
/**/ ua25 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub25 = {{0x3ccc2375, 0x00000000} }, /* 7.810e-16 */
/**/ u26 = {{0x3c7e40af, 0x00000000} }, /* 2.624e-17 */
/**/ ua26 = {{0x3bfd8b58, 0x00000000} }, /* 1.001e-19 */
/**/ ub26 = {{0x3ccc6405, 0x00000000} }, /* 7.880e-16 */
/**/ u27 = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
/**/ u28 = {{0x3ad421cb, 0x00000000} }, /* 2.602e-25 */
/**/ mp1 = {{0x3FF921FB, 0x58000000} },
/**/ mp2 = {{0xBE4DDE97, 0x3C000000} },
/**/ mp3 = {{0xBC8CB3B3, 0x99D747F2} },
/**/ pp3 = {{0xBC8CB3B3, 0x98000000} },
/**/ pp4 = {{0xbacd747f, 0x23e32ed7} },
/**/ hpinv = {{0x3FE45F30, 0x6DC9C883} },
/**/ toint = {{0x43380000, 0x00000000} };
#else
#ifdef LITTLE_ENDI
static const number
/* polynomial I */
/**/ d3 = {{0x55555555, 0x3FD55555} }, /* 0.333... */
/**/ d5 = {{0x111107C6, 0x3FC11111} }, /* 0.133... */
/**/ d7 = {{0x1CDB8745, 0x3FABA1BA} }, /* . */
/**/ d9 = {{0x49CFC666, 0x3F9664ED} }, /* . */
/**/ d11 = {{0x3CF2E4EA, 0x3F82385A} }, /* . */
/* polynomial II */
/**/ a3 = {{0x55555555, 0x3fd55555} }, /* 1/3 */
/**/ aa3 = {{0x55555555, 0x3c755555} }, /* 1/3-a3 */
/**/ a5 = {{0x11111111, 0x3fc11111} }, /* 2/15 */
/**/ aa5 = {{0x11111111, 0x3c411111} }, /* 2/15-a5 */
/**/ a7 = {{0x1ba1ba1c, 0x3faba1ba} }, /* 17/315 */
/**/ aa7 = {{0x17917918, 0xbc479179} }, /* ()-a7 */
/**/ a9 = {{0x882c10fa, 0x3f9664f4} }, /* 62/2835 */
/**/ aa9 = {{0x8b6c44fd, 0xbc09a528} }, /* ()-a9 */
/**/ a11 = {{0x55e6c23d, 0x3f8226e3} }, /* . */
/**/ aa11 = {{0x8f1a2c13, 0xbc2c292b} }, /* . */
/**/ a13 = {{0x0e157de0, 0x3f6d6d3d} }, /* . */
/**/ aa13 = {{0xc968d971, 0xbc0280cf} }, /* . */
/**/ a15 = {{0x452b75e3, 0x3f57da36} }, /* . */
#if 0
/**/ aa15 = {{0xb285d2ed, 0xbbf25789} }, /* . */
#endif
/**/ a17 = {{0x48036744, 0x3f435582} }, /* . */
#if 0
/**/ aa17 = {{0x563f1f23, 0x3be488d9} }, /* . */
#endif
/**/ a19 = {{0x734d1664, 0x3f2f57d7} }, /* . */
#if 0
/**/ aa19 = {{0x913ccb50, 0x3bb0d55a} }, /* . */
#endif
/**/ a21 = {{0x8afcafad, 0x3f1967e1} }, /* . */
#if 0
/**/ aa21 = {{0xa42d44e6, 0xbbbd7614} }, /* . */
#endif
/**/ a23 = {{0xeea25259, 0x3f0497d8} }, /* . */
#if 0
/**/ aa23 = {{0x2e4d2863, 0x3b99f2d0} }, /* . */
#endif
/**/ a25 = {{0xd39a6050, 0x3ef0b132} }, /* . */
#if 0
/**/ aa25 = {{0xc2c19614, 0x3b93b274} }, /* . */
#endif
/**/ a27 = {{0xd3ee24e9, 0x3edb0f72} }, /* . */
#if 0
/**/ aa27 = {{0xdd595609, 0x3b61688d} }, /* . */
#endif
/* polynomial III */
/**/ e0 = {{0x55554DBD, 0x3FD55555} }, /* . */
/**/ e1 = {{0xE0A6B45F, 0x3FC11112} }, /* . */
/* constants */
/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ mone = {{0x00000000, 0xbff00000} }, /*-1 */
/**/ mfftnhf = {{0x00000000, 0xc02f0000} }, /*-15.5 */
/**/ two8 = {{0x00000000, 0x40700000} }, /* 256 */
/**/ g1 = {{0x00000000, 0x3e4b096c} }, /* 1.259e-8 */
/**/ g2 = {{0x00000000, 0x3faf212d} }, /* 0.0608 */
/**/ g3 = {{0x00000000, 0x3fe92f1a} }, /* 0.787 */
/**/ g4 = {{0x00000000, 0x40390000} }, /* 25.0 */
/**/ g5 = {{0x00000000, 0x4197d784} }, /* 1e8 */
/**/ gy1 = {{0x9abcaf48, 0x3e7ad7f2} }, /* 1e-7 */
/**/ gy2 = {{0x00000000, 0x3faf212d} }, /* 0.0608 */
/**/ u1 = {{0x00000000, 0x3cc8c33a} }, /* 6.873e-16 */
/**/ u2 = {{0x00000000, 0x3983dc4d} }, /* 1.224e-31 */
/**/ u3 = {{0x00000000, 0x3c78e14b} }, /* 2.158e-17 */
/**/ ua3 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub3 = {{0x00000000, 0x3cc81898} }, /* 6.688e-16 */
/**/ u4 = {{0x00000000, 0x399856c2} }, /* 3e-31 */
/**/ u5 = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
/**/ u6 = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
/**/ u7 = {{0x00000000, 0x39903beb} }, /* 2.001e-31 */
/**/ u8 = {{0x00000000, 0x399c56ae} }, /* 3.493e-31 */
/**/ u9 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua9 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub9 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u10 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua10 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub10 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u11 = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
/**/ u12 = {{0x00000000, 0x39e509b6} }, /* 8.298e-30 */
/**/ u13 = {{0x00000000, 0x3c39d80a} }, /* 1.401e-18 */
/**/ u14 = {{0x00000000, 0x3c374c5a} }, /* 1.263e-18 */
/**/ u15 = {{0x00000000, 0x3ab5767a} }, /* 6.935e-26 */
/**/ u16 = {{0x00000000, 0x3ab57744} }, /* 6.936e-26 */
/**/ u17 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua17 = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
/**/ ub17 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u18 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua18 = {{0x00000000, 0x3bfdb11f} }, /* 1.006e-19 */
/**/ ub18 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u19 = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
/**/ u20 = {{0x00000000, 0x39a13b61} }, /* 4.248e-31 */
/**/ u21 = {{0x00000000, 0x3c3bb9b8} }, /* 1.503e-18 */
/**/ u22 = {{0x00000000, 0x3c392e08} }, /* 1.365e-18 */
/**/ u23 = {{0x00000000, 0x3a0ce706} }, /* 4.560e-29 */
/**/ u24 = {{0x00000000, 0x3a0cff5d} }, /* 4.575e-29 */
/**/ u25 = {{0x00000000, 0x3c7d0ac7} }, /* 2.519e-17 */
/**/ ua25 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub25 = {{0x00000000, 0x3ccc2375} }, /* 7.810e-16 */
/**/ u26 = {{0x00000000, 0x3c7e40af} }, /* 2.624e-17 */
/**/ ua26 = {{0x00000000, 0x3bfd8b58} }, /* 1.001e-19 */
/**/ ub26 = {{0x00000000, 0x3ccc6405} }, /* 7.880e-16 */
/**/ u27 = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
/**/ u28 = {{0x00000000, 0x3ad421cb} }, /* 2.602e-25 */
/**/ mp1 = {{0x58000000, 0x3FF921FB} },
/**/ mp2 = {{0x3C000000, 0xBE4DDE97} },
/**/ mp3 = {{0x99D747F2, 0xBC8CB3B3} },
/**/ pp3 = {{0x98000000, 0xBC8CB3B3} },
/**/ pp4 = {{0x23e32ed7, 0xbacd747f} },
/**/ hpinv = {{0x6DC9C883, 0x3FE45F30} },
/**/ toint = {{0x00000000, 0x43380000} };
#endif
#endif
#define ZERO zero.d
#define ONE one.d
#define MONE mone.d
#define TWO8 two8.d
#endif

File diff suppressed because it is too large Load diff

View file

@ -35,37 +35,7 @@ libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_sqrtf.c \
@srcdir@/../flt-32/s_scalbnf.c \
@srcdir@/../flt-32/s_floorf.c \
@srcdir@/../flt-32/s_isinff.c \
@srcdir@/../dbl-64/t_exp.c \
@srcdir@/../dbl-64/e_asin.c \
@srcdir@/../dbl-64/e_atan2.c \
@srcdir@/../dbl-64/s_atan.c \
@srcdir@/../dbl-64/branred.c \
@srcdir@/../dbl-64/doasin.c \
@srcdir@/../dbl-64/dosincos.c \
@srcdir@/../dbl-64/e_exp.c \
@srcdir@/../dbl-64/halfulp.c \
@srcdir@/../dbl-64/k_rem_pio2.c \
@srcdir@/../dbl-64/e_log10.c \
@srcdir@/../dbl-64/e_log.c \
@srcdir@/../dbl-64/mpa.c \
@srcdir@/../dbl-64/mpatan2.c \
@srcdir@/../dbl-64/mpatan.c \
@srcdir@/../dbl-64/mpexp.c \
@srcdir@/../dbl-64/mplog.c \
@srcdir@/../dbl-64/mpsqrt.c \
@srcdir@/../dbl-64/mptan.c \
@srcdir@/../dbl-64/e_pow.c \
@srcdir@/../dbl-64/e_rem_pio2.c \
@srcdir@/../dbl-64/s_sin.c \
@srcdir@/../dbl-64/sincos32.c \
@srcdir@/../dbl-64/slowexp.c \
@srcdir@/../dbl-64/slowpow.c \
@srcdir@/../dbl-64/e_sqrt.c \
@srcdir@/../dbl-64/s_tan.c \
@srcdir@/../dbl-64/s_scalbn.c \
@srcdir@/../dbl-64/s_floor.c \
@srcdir@/../dbl-64/s_isinf.c
@srcdir@/../flt-32/s_isinff.c
# XXX hack alert

View file

@ -59,20 +59,7 @@ am_libsse2_la_OBJECTS = libsse2_la-e_acosf.lo libsse2_la-e_asinf.lo \
libsse2_la-k_sinf.lo libsse2_la-k_tanf.lo \
libsse2_la-e_rem_pio2f.lo libsse2_la-e_sqrtf.lo \
libsse2_la-s_scalbnf.lo libsse2_la-s_floorf.lo \
libsse2_la-s_isinff.lo libsse2_la-t_exp.lo \
libsse2_la-e_asin.lo libsse2_la-e_atan2.lo \
libsse2_la-s_atan.lo libsse2_la-branred.lo \
libsse2_la-doasin.lo libsse2_la-dosincos.lo \
libsse2_la-e_exp.lo libsse2_la-halfulp.lo \
libsse2_la-k_rem_pio2.lo libsse2_la-e_log10.lo \
libsse2_la-e_log.lo libsse2_la-mpa.lo libsse2_la-mpatan2.lo \
libsse2_la-mpatan.lo libsse2_la-mpexp.lo libsse2_la-mplog.lo \
libsse2_la-mpsqrt.lo libsse2_la-mptan.lo libsse2_la-e_pow.lo \
libsse2_la-e_rem_pio2.lo libsse2_la-s_sin.lo \
libsse2_la-sincos32.lo libsse2_la-slowexp.lo \
libsse2_la-slowpow.lo libsse2_la-e_sqrt.lo libsse2_la-s_tan.lo \
libsse2_la-s_scalbn.lo libsse2_la-s_floor.lo \
libsse2_la-s_isinf.lo
libsse2_la-s_isinff.lo
libsse2_la_OBJECTS = $(am_libsse2_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir)
depcomp = $(SHELL) $(top_srcdir)/../depcomp
@ -224,37 +211,7 @@ libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_sqrtf.c \
@srcdir@/../flt-32/s_scalbnf.c \
@srcdir@/../flt-32/s_floorf.c \
@srcdir@/../flt-32/s_isinff.c \
@srcdir@/../dbl-64/t_exp.c \
@srcdir@/../dbl-64/e_asin.c \
@srcdir@/../dbl-64/e_atan2.c \
@srcdir@/../dbl-64/s_atan.c \
@srcdir@/../dbl-64/branred.c \
@srcdir@/../dbl-64/doasin.c \
@srcdir@/../dbl-64/dosincos.c \
@srcdir@/../dbl-64/e_exp.c \
@srcdir@/../dbl-64/halfulp.c \
@srcdir@/../dbl-64/k_rem_pio2.c \
@srcdir@/../dbl-64/e_log10.c \
@srcdir@/../dbl-64/e_log.c \
@srcdir@/../dbl-64/mpa.c \
@srcdir@/../dbl-64/mpatan2.c \
@srcdir@/../dbl-64/mpatan.c \
@srcdir@/../dbl-64/mpexp.c \
@srcdir@/../dbl-64/mplog.c \
@srcdir@/../dbl-64/mpsqrt.c \
@srcdir@/../dbl-64/mptan.c \
@srcdir@/../dbl-64/e_pow.c \
@srcdir@/../dbl-64/e_rem_pio2.c \
@srcdir@/../dbl-64/s_sin.c \
@srcdir@/../dbl-64/sincos32.c \
@srcdir@/../dbl-64/slowexp.c \
@srcdir@/../dbl-64/slowpow.c \
@srcdir@/../dbl-64/e_sqrt.c \
@srcdir@/../dbl-64/s_tan.c \
@srcdir@/../dbl-64/s_scalbn.c \
@srcdir@/../dbl-64/s_floor.c \
@srcdir@/../dbl-64/s_isinf.c
@srcdir@/../flt-32/s_isinff.c
# XXX hack alert
@ -352,56 +309,26 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-branred.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-doasin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-dosincos.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_acosf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_asin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_asinf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_atan2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_atan2f.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_exp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_expf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_log.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_log10.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_log10f.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_logf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_pow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_powf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_rem_pio2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_rem_pio2f.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_sqrt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-e_sqrtf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-halfulp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-k_cosf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-k_rem_pio2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-k_rem_pio2f.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-k_sinf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-k_tanf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mpa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mpatan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mpatan2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mpexp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mplog.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mpsqrt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-mptan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_atan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_atanf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_cosf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_floor.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_floorf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_isinf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_isinff.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_scalbn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_scalbnf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_sin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_sinf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_tan.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-s_tanf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-sincos32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-slowexp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-slowpow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse2_la-t_exp.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@ -564,216 +491,6 @@ libsse2_la-s_isinff.lo: @srcdir@/../flt-32/s_isinff.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_isinff.lo `test -f '@srcdir@/../flt-32/s_isinff.c' || echo '$(srcdir)/'`@srcdir@/../flt-32/s_isinff.c
libsse2_la-t_exp.lo: @srcdir@/../dbl-64/t_exp.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-t_exp.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-t_exp.Tpo" -c -o libsse2_la-t_exp.lo `test -f '@srcdir@/../dbl-64/t_exp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/t_exp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-t_exp.Tpo" "$(DEPDIR)/libsse2_la-t_exp.Plo"; else rm -f "$(DEPDIR)/libsse2_la-t_exp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/t_exp.c' object='libsse2_la-t_exp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-t_exp.lo `test -f '@srcdir@/../dbl-64/t_exp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/t_exp.c
libsse2_la-e_asin.lo: @srcdir@/../dbl-64/e_asin.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_asin.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_asin.Tpo" -c -o libsse2_la-e_asin.lo `test -f '@srcdir@/../dbl-64/e_asin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_asin.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_asin.Tpo" "$(DEPDIR)/libsse2_la-e_asin.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_asin.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_asin.c' object='libsse2_la-e_asin.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_asin.lo `test -f '@srcdir@/../dbl-64/e_asin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_asin.c
libsse2_la-e_atan2.lo: @srcdir@/../dbl-64/e_atan2.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_atan2.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_atan2.Tpo" -c -o libsse2_la-e_atan2.lo `test -f '@srcdir@/../dbl-64/e_atan2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_atan2.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_atan2.Tpo" "$(DEPDIR)/libsse2_la-e_atan2.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_atan2.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_atan2.c' object='libsse2_la-e_atan2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_atan2.lo `test -f '@srcdir@/../dbl-64/e_atan2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_atan2.c
libsse2_la-s_atan.lo: @srcdir@/../dbl-64/s_atan.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_atan.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_atan.Tpo" -c -o libsse2_la-s_atan.lo `test -f '@srcdir@/../dbl-64/s_atan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_atan.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_atan.Tpo" "$(DEPDIR)/libsse2_la-s_atan.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_atan.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_atan.c' object='libsse2_la-s_atan.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_atan.lo `test -f '@srcdir@/../dbl-64/s_atan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_atan.c
libsse2_la-branred.lo: @srcdir@/../dbl-64/branred.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-branred.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-branred.Tpo" -c -o libsse2_la-branred.lo `test -f '@srcdir@/../dbl-64/branred.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/branred.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-branred.Tpo" "$(DEPDIR)/libsse2_la-branred.Plo"; else rm -f "$(DEPDIR)/libsse2_la-branred.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/branred.c' object='libsse2_la-branred.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-branred.lo `test -f '@srcdir@/../dbl-64/branred.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/branred.c
libsse2_la-doasin.lo: @srcdir@/../dbl-64/doasin.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-doasin.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-doasin.Tpo" -c -o libsse2_la-doasin.lo `test -f '@srcdir@/../dbl-64/doasin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/doasin.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-doasin.Tpo" "$(DEPDIR)/libsse2_la-doasin.Plo"; else rm -f "$(DEPDIR)/libsse2_la-doasin.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/doasin.c' object='libsse2_la-doasin.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-doasin.lo `test -f '@srcdir@/../dbl-64/doasin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/doasin.c
libsse2_la-dosincos.lo: @srcdir@/../dbl-64/dosincos.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-dosincos.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-dosincos.Tpo" -c -o libsse2_la-dosincos.lo `test -f '@srcdir@/../dbl-64/dosincos.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/dosincos.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-dosincos.Tpo" "$(DEPDIR)/libsse2_la-dosincos.Plo"; else rm -f "$(DEPDIR)/libsse2_la-dosincos.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/dosincos.c' object='libsse2_la-dosincos.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-dosincos.lo `test -f '@srcdir@/../dbl-64/dosincos.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/dosincos.c
libsse2_la-e_exp.lo: @srcdir@/../dbl-64/e_exp.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_exp.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_exp.Tpo" -c -o libsse2_la-e_exp.lo `test -f '@srcdir@/../dbl-64/e_exp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_exp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_exp.Tpo" "$(DEPDIR)/libsse2_la-e_exp.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_exp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_exp.c' object='libsse2_la-e_exp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_exp.lo `test -f '@srcdir@/../dbl-64/e_exp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_exp.c
libsse2_la-halfulp.lo: @srcdir@/../dbl-64/halfulp.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-halfulp.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-halfulp.Tpo" -c -o libsse2_la-halfulp.lo `test -f '@srcdir@/../dbl-64/halfulp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/halfulp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-halfulp.Tpo" "$(DEPDIR)/libsse2_la-halfulp.Plo"; else rm -f "$(DEPDIR)/libsse2_la-halfulp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/halfulp.c' object='libsse2_la-halfulp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-halfulp.lo `test -f '@srcdir@/../dbl-64/halfulp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/halfulp.c
libsse2_la-k_rem_pio2.lo: @srcdir@/../dbl-64/k_rem_pio2.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-k_rem_pio2.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-k_rem_pio2.Tpo" -c -o libsse2_la-k_rem_pio2.lo `test -f '@srcdir@/../dbl-64/k_rem_pio2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/k_rem_pio2.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-k_rem_pio2.Tpo" "$(DEPDIR)/libsse2_la-k_rem_pio2.Plo"; else rm -f "$(DEPDIR)/libsse2_la-k_rem_pio2.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/k_rem_pio2.c' object='libsse2_la-k_rem_pio2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-k_rem_pio2.lo `test -f '@srcdir@/../dbl-64/k_rem_pio2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/k_rem_pio2.c
libsse2_la-e_log10.lo: @srcdir@/../dbl-64/e_log10.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_log10.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_log10.Tpo" -c -o libsse2_la-e_log10.lo `test -f '@srcdir@/../dbl-64/e_log10.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_log10.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_log10.Tpo" "$(DEPDIR)/libsse2_la-e_log10.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_log10.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_log10.c' object='libsse2_la-e_log10.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_log10.lo `test -f '@srcdir@/../dbl-64/e_log10.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_log10.c
libsse2_la-e_log.lo: @srcdir@/../dbl-64/e_log.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_log.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_log.Tpo" -c -o libsse2_la-e_log.lo `test -f '@srcdir@/../dbl-64/e_log.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_log.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_log.Tpo" "$(DEPDIR)/libsse2_la-e_log.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_log.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_log.c' object='libsse2_la-e_log.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_log.lo `test -f '@srcdir@/../dbl-64/e_log.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_log.c
libsse2_la-mpa.lo: @srcdir@/../dbl-64/mpa.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mpa.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mpa.Tpo" -c -o libsse2_la-mpa.lo `test -f '@srcdir@/../dbl-64/mpa.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpa.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mpa.Tpo" "$(DEPDIR)/libsse2_la-mpa.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mpa.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mpa.c' object='libsse2_la-mpa.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mpa.lo `test -f '@srcdir@/../dbl-64/mpa.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpa.c
libsse2_la-mpatan2.lo: @srcdir@/../dbl-64/mpatan2.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mpatan2.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mpatan2.Tpo" -c -o libsse2_la-mpatan2.lo `test -f '@srcdir@/../dbl-64/mpatan2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpatan2.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mpatan2.Tpo" "$(DEPDIR)/libsse2_la-mpatan2.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mpatan2.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mpatan2.c' object='libsse2_la-mpatan2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mpatan2.lo `test -f '@srcdir@/../dbl-64/mpatan2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpatan2.c
libsse2_la-mpatan.lo: @srcdir@/../dbl-64/mpatan.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mpatan.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mpatan.Tpo" -c -o libsse2_la-mpatan.lo `test -f '@srcdir@/../dbl-64/mpatan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpatan.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mpatan.Tpo" "$(DEPDIR)/libsse2_la-mpatan.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mpatan.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mpatan.c' object='libsse2_la-mpatan.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mpatan.lo `test -f '@srcdir@/../dbl-64/mpatan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpatan.c
libsse2_la-mpexp.lo: @srcdir@/../dbl-64/mpexp.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mpexp.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mpexp.Tpo" -c -o libsse2_la-mpexp.lo `test -f '@srcdir@/../dbl-64/mpexp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpexp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mpexp.Tpo" "$(DEPDIR)/libsse2_la-mpexp.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mpexp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mpexp.c' object='libsse2_la-mpexp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mpexp.lo `test -f '@srcdir@/../dbl-64/mpexp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpexp.c
libsse2_la-mplog.lo: @srcdir@/../dbl-64/mplog.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mplog.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mplog.Tpo" -c -o libsse2_la-mplog.lo `test -f '@srcdir@/../dbl-64/mplog.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mplog.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mplog.Tpo" "$(DEPDIR)/libsse2_la-mplog.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mplog.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mplog.c' object='libsse2_la-mplog.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mplog.lo `test -f '@srcdir@/../dbl-64/mplog.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mplog.c
libsse2_la-mpsqrt.lo: @srcdir@/../dbl-64/mpsqrt.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mpsqrt.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mpsqrt.Tpo" -c -o libsse2_la-mpsqrt.lo `test -f '@srcdir@/../dbl-64/mpsqrt.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpsqrt.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mpsqrt.Tpo" "$(DEPDIR)/libsse2_la-mpsqrt.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mpsqrt.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mpsqrt.c' object='libsse2_la-mpsqrt.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mpsqrt.lo `test -f '@srcdir@/../dbl-64/mpsqrt.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mpsqrt.c
libsse2_la-mptan.lo: @srcdir@/../dbl-64/mptan.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-mptan.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-mptan.Tpo" -c -o libsse2_la-mptan.lo `test -f '@srcdir@/../dbl-64/mptan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mptan.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-mptan.Tpo" "$(DEPDIR)/libsse2_la-mptan.Plo"; else rm -f "$(DEPDIR)/libsse2_la-mptan.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/mptan.c' object='libsse2_la-mptan.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-mptan.lo `test -f '@srcdir@/../dbl-64/mptan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/mptan.c
libsse2_la-e_pow.lo: @srcdir@/../dbl-64/e_pow.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_pow.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_pow.Tpo" -c -o libsse2_la-e_pow.lo `test -f '@srcdir@/../dbl-64/e_pow.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_pow.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_pow.Tpo" "$(DEPDIR)/libsse2_la-e_pow.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_pow.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_pow.c' object='libsse2_la-e_pow.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_pow.lo `test -f '@srcdir@/../dbl-64/e_pow.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_pow.c
libsse2_la-e_rem_pio2.lo: @srcdir@/../dbl-64/e_rem_pio2.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_rem_pio2.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_rem_pio2.Tpo" -c -o libsse2_la-e_rem_pio2.lo `test -f '@srcdir@/../dbl-64/e_rem_pio2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_rem_pio2.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_rem_pio2.Tpo" "$(DEPDIR)/libsse2_la-e_rem_pio2.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_rem_pio2.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_rem_pio2.c' object='libsse2_la-e_rem_pio2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_rem_pio2.lo `test -f '@srcdir@/../dbl-64/e_rem_pio2.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_rem_pio2.c
libsse2_la-s_sin.lo: @srcdir@/../dbl-64/s_sin.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_sin.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_sin.Tpo" -c -o libsse2_la-s_sin.lo `test -f '@srcdir@/../dbl-64/s_sin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_sin.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_sin.Tpo" "$(DEPDIR)/libsse2_la-s_sin.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_sin.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_sin.c' object='libsse2_la-s_sin.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_sin.lo `test -f '@srcdir@/../dbl-64/s_sin.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_sin.c
libsse2_la-sincos32.lo: @srcdir@/../dbl-64/sincos32.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-sincos32.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-sincos32.Tpo" -c -o libsse2_la-sincos32.lo `test -f '@srcdir@/../dbl-64/sincos32.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/sincos32.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-sincos32.Tpo" "$(DEPDIR)/libsse2_la-sincos32.Plo"; else rm -f "$(DEPDIR)/libsse2_la-sincos32.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/sincos32.c' object='libsse2_la-sincos32.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-sincos32.lo `test -f '@srcdir@/../dbl-64/sincos32.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/sincos32.c
libsse2_la-slowexp.lo: @srcdir@/../dbl-64/slowexp.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-slowexp.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-slowexp.Tpo" -c -o libsse2_la-slowexp.lo `test -f '@srcdir@/../dbl-64/slowexp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/slowexp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-slowexp.Tpo" "$(DEPDIR)/libsse2_la-slowexp.Plo"; else rm -f "$(DEPDIR)/libsse2_la-slowexp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/slowexp.c' object='libsse2_la-slowexp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-slowexp.lo `test -f '@srcdir@/../dbl-64/slowexp.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/slowexp.c
libsse2_la-slowpow.lo: @srcdir@/../dbl-64/slowpow.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-slowpow.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-slowpow.Tpo" -c -o libsse2_la-slowpow.lo `test -f '@srcdir@/../dbl-64/slowpow.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/slowpow.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-slowpow.Tpo" "$(DEPDIR)/libsse2_la-slowpow.Plo"; else rm -f "$(DEPDIR)/libsse2_la-slowpow.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/slowpow.c' object='libsse2_la-slowpow.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-slowpow.lo `test -f '@srcdir@/../dbl-64/slowpow.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/slowpow.c
libsse2_la-e_sqrt.lo: @srcdir@/../dbl-64/e_sqrt.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-e_sqrt.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-e_sqrt.Tpo" -c -o libsse2_la-e_sqrt.lo `test -f '@srcdir@/../dbl-64/e_sqrt.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_sqrt.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-e_sqrt.Tpo" "$(DEPDIR)/libsse2_la-e_sqrt.Plo"; else rm -f "$(DEPDIR)/libsse2_la-e_sqrt.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/e_sqrt.c' object='libsse2_la-e_sqrt.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-e_sqrt.lo `test -f '@srcdir@/../dbl-64/e_sqrt.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/e_sqrt.c
libsse2_la-s_tan.lo: @srcdir@/../dbl-64/s_tan.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_tan.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_tan.Tpo" -c -o libsse2_la-s_tan.lo `test -f '@srcdir@/../dbl-64/s_tan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_tan.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_tan.Tpo" "$(DEPDIR)/libsse2_la-s_tan.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_tan.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_tan.c' object='libsse2_la-s_tan.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_tan.lo `test -f '@srcdir@/../dbl-64/s_tan.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_tan.c
libsse2_la-s_scalbn.lo: @srcdir@/../dbl-64/s_scalbn.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_scalbn.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_scalbn.Tpo" -c -o libsse2_la-s_scalbn.lo `test -f '@srcdir@/../dbl-64/s_scalbn.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_scalbn.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_scalbn.Tpo" "$(DEPDIR)/libsse2_la-s_scalbn.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_scalbn.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_scalbn.c' object='libsse2_la-s_scalbn.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_scalbn.lo `test -f '@srcdir@/../dbl-64/s_scalbn.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_scalbn.c
libsse2_la-s_floor.lo: @srcdir@/../dbl-64/s_floor.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_floor.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_floor.Tpo" -c -o libsse2_la-s_floor.lo `test -f '@srcdir@/../dbl-64/s_floor.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_floor.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_floor.Tpo" "$(DEPDIR)/libsse2_la-s_floor.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_floor.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_floor.c' object='libsse2_la-s_floor.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_floor.lo `test -f '@srcdir@/../dbl-64/s_floor.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_floor.c
libsse2_la-s_isinf.lo: @srcdir@/../dbl-64/s_isinf.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -MT libsse2_la-s_isinf.lo -MD -MP -MF "$(DEPDIR)/libsse2_la-s_isinf.Tpo" -c -o libsse2_la-s_isinf.lo `test -f '@srcdir@/../dbl-64/s_isinf.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_isinf.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsse2_la-s_isinf.Tpo" "$(DEPDIR)/libsse2_la-s_isinf.Plo"; else rm -f "$(DEPDIR)/libsse2_la-s_isinf.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='@srcdir@/../dbl-64/s_isinf.c' object='libsse2_la-s_isinf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse2_la_CFLAGS) $(CFLAGS) -c -o libsse2_la-s_isinf.lo `test -f '@srcdir@/../dbl-64/s_isinf.c' || echo '$(srcdir)/'`@srcdir@/../dbl-64/s_isinf.c
mostlyclean-libtool:
-rm -f *.lo