[multiple changes]
Fri May 28 22:20:03 1999 Anthony Green <green@cygnus.com> * java/lang/fdlibm.h: Don't use __uint32_t. Include mprec.h. * java/lang/e_log.c: Don't use __uint32_t. 1999-05-27 Eric Christopher <echristo@cygnus.com> * configure: Rebuilt * configure.in: Fixed ISO C9X and namespace collision with __uint32_t * acconfig.h: Rebuilt * include/config.h.in: Rebuilt * java/lang/mprec.h, java/lang/e_acos.c, java/lang/e_asin.c, java/lang/e_atan2.c, java/lang/e_exp.c, java/lang/e_fmod.c, e_log.c, java/lang/e_pow.c, java/lang/e_rem_pio2.c, java/lang/e_remainder.c, java/lang/e_sqrt.c, java/lang/fdlibm.h, k_tan.c, java/lang/mprec.h, java/lang/s_atan.c, java/lang/s_ceil.c, java/lang/s_copysign.c, java/lang/s_fabs.c, s_floor.c, java/lang/s_rint.c, java/lang/sf_rint.c: Fixed ISO C9X and namespace collision with __uint32_t From-SVN: r27729
This commit is contained in:
parent
fe574d5d92
commit
0d16618c58
31 changed files with 614 additions and 526 deletions
|
@ -6,20 +6,20 @@
|
|||
*
|
||||
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software is freely granted, provided that this notice
|
||||
* software is freely granted, provided that this notice
|
||||
* is preserved.
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
/* __ieee754_acos(x)
|
||||
* Method :
|
||||
* Method :
|
||||
* acos(x) = pi/2 - asin(x)
|
||||
* acos(-x) = pi/2 + asin(x)
|
||||
* For |x|<=0.5
|
||||
* acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c)
|
||||
* For x>0.5
|
||||
* acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))
|
||||
* = 2asin(sqrt((1-x)/2))
|
||||
* = 2asin(sqrt((1-x)/2))
|
||||
* = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z)
|
||||
* = 2f + (2c + 2s*z*R(z))
|
||||
* where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term
|
||||
|
@ -40,9 +40,9 @@
|
|||
#ifndef _DOUBLE_IS_32BITS
|
||||
|
||||
#ifdef __STDC__
|
||||
static const double
|
||||
static const double
|
||||
#else
|
||||
static double
|
||||
static double
|
||||
#endif
|
||||
one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
||||
pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
|
||||
|
@ -67,11 +67,11 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
|||
#endif
|
||||
{
|
||||
double z,p,q,r,w,s,c,df;
|
||||
__int32_t hx,ix;
|
||||
int32_t hx,ix;
|
||||
GET_HIGH_WORD(hx,x);
|
||||
ix = hx&0x7fffffff;
|
||||
if(ix>=0x3ff00000) { /* |x| >= 1 */
|
||||
__uint32_t lx;
|
||||
uint32_t lx;
|
||||
GET_LOW_WORD(lx,x);
|
||||
if(((ix-0x3ff00000)|lx)==0) { /* |x|==1 */
|
||||
if(hx>0) return 0.0; /* acos(1) = 0 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue