30 #include <sys/isa_defs.h> 31 #include "libm_inlines.h" 32 33 #ifdef _LITTLE_ENDIAN 34 #define HI(x) *(1+(int*)x) 35 #define LO(x) *(unsigned*)x 36 #else 37 #define HI(x) *(int*)x 38 #define LO(x) *(1+(unsigned*)x) 39 #endif 40 41 #ifdef __RESTRICT 42 #define restrict _Restrict 43 #else 44 #define restrict 45 #endif 46 47 void 48 __vatan( int n, double * restrict x, int stridex, double * restrict y, int stridey ) 49 { 50 double f , z, ans, ansu , ansl , tmp , poly , conup , conlo , dummy; 51 double f1, ans1, ansu1, ansl1, tmp1, poly1, conup1, conlo1; 52 double f2, ans2, ansu2, ansl2, tmp2, poly2, conup2, conlo2; 53 int index, sign, intf, intflo, intz, argcount; 54 int index1, sign1 ; 55 int index2, sign2 ; 56 double *yaddr,*yaddr1,*yaddr2; 57 extern const double __vlibm_TBL_atan1[]; 58 extern double fabs( double ); 59 60 /* Power series atan(x) = x + p1*x**3 + p2*x**5 + p3*x**7 61 * Error = -3.08254E-18 On the interval |x| < 1/64 */ 62 63 /* define dummy names for readability. Use parray to help compiler optimize loads */ 64 #define p3 parray[0] 65 #define p2 parray[1] 66 #define p1 parray[2] 67 68 static const double parray[] = { 69 -1.428029046844299722E-01, /* p[3] */ 70 1.999999917247000615E-01, /* p[2] */ 71 -3.333333333329292858E-01, /* p[1] */ 72 1.0, /* not used for p[0], though */ 73 -1.0, /* used to flip sign of answer */ 74 }; 75 76 if( n <= 0 ) return; /* if no. of elements is 0 or neg, do nothing */ | 30 #include <sys/isa_defs.h> 31 #include "libm_inlines.h" 32 33 #ifdef _LITTLE_ENDIAN 34 #define HI(x) *(1+(int*)x) 35 #define LO(x) *(unsigned*)x 36 #else 37 #define HI(x) *(int*)x 38 #define LO(x) *(1+(unsigned*)x) 39 #endif 40 41 #ifdef __RESTRICT 42 #define restrict _Restrict 43 #else 44 #define restrict 45 #endif 46 47 void 48 __vatan( int n, double * restrict x, int stridex, double * restrict y, int stridey ) 49 { 50 double f , z, ans = 0.0L, ansu , ansl , tmp , poly , conup , conlo , dummy; 51 double f1, ans1, ansu1, ansl1, tmp1, poly1, conup1, conlo1; 52 double f2, ans2, ansu2, ansl2, tmp2, poly2, conup2, conlo2; 53 int index, sign, intf, intflo, intz, argcount; 54 int index1, sign1 = 0; 55 int index2, sign2 = 0; 56 double *yaddr,*yaddr1 = 0,*yaddr2 = 0; 57 extern const double __vlibm_TBL_atan1[]; 58 extern double fabs( double ); 59 60 /* Power series atan(x) = x + p1*x**3 + p2*x**5 + p3*x**7 61 * Error = -3.08254E-18 On the interval |x| < 1/64 */ 62 63 /* define dummy names for readability. Use parray to help compiler optimize loads */ 64 #define p3 parray[0] 65 #define p2 parray[1] 66 #define p1 parray[2] 67 68 static const double parray[] = { 69 -1.428029046844299722E-01, /* p[3] */ 70 1.999999917247000615E-01, /* p[2] */ 71 -3.333333333329292858E-01, /* p[1] */ 72 1.0, /* not used for p[0], though */ 73 -1.0, /* used to flip sign of answer */ 74 }; 75 76 if( n <= 0 ) return; /* if no. of elements is 0 or neg, do nothing */ |