Print this page




  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #ifdef __RESTRICT
  31 #define restrict _Restrict
  32 #else
  33 #define restrict
  34 #endif
  35 
  36 void
  37 __vatanf( int n, float * restrict x, int stridex, float * restrict y, int stridey )
  38 {
  39   extern const double __vlibm_TBL_atan1[];
  40   double  conup0, conup1, conup2;
  41   float dummy, ansf;
  42   float f0, f1, f2;
  43   float ans0, ans1, ans2;
  44   float poly0, poly1, poly2;
  45   float sign0, sign1, sign2;
  46   int intf, intz, argcount;
  47   int index0, index1, index2; 
  48   float z,*yaddr0,*yaddr1,*yaddr2;
  49   int *pz = (int *) &z;
  50 #ifdef UNROLL4
  51   double conup3;
  52   int index3;
  53   float f3, ans3, poly3, sign3, *yaddr3;
  54 #endif
  55 
  56 /*    Power series  atan(x) = x + p1*x**3 + p2*x**5 + p3*x**7
  57  *    Error =  -3.08254E-18   On the interval  |x| < 1/64 */
  58 
  59   static const float p1 = -0.33329644f /* -3.333333333329292858E-01f */ ;
  60   static const float pone = 1.0f;
  61 




  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #ifdef __RESTRICT
  31 #define restrict _Restrict
  32 #else
  33 #define restrict
  34 #endif
  35 
  36 void
  37 __vatanf( int n, float * restrict x, int stridex, float * restrict y, int stridey )
  38 {
  39   extern const double __vlibm_TBL_atan1[];
  40   double  conup0, conup1, conup2;
  41   float dummy, ansf = 0.0;
  42   float f0, f1, f2;
  43   float ans0, ans1, ans2;
  44   float poly0, poly1, poly2;
  45   float sign0, sign1, sign2;
  46   int intf, intz, argcount;
  47   int index0, index1, index2; 
  48   float z,*yaddr0,*yaddr1,*yaddr2;
  49   int *pz = (int *) &z;
  50 #ifdef UNROLL4
  51   double conup3;
  52   int index3;
  53   float f3, ans3, poly3, sign3, *yaddr3;
  54 #endif
  55 
  56 /*    Power series  atan(x) = x + p1*x**3 + p2*x**5 + p3*x**7
  57  *    Error =  -3.08254E-18   On the interval  |x| < 1/64 */
  58 
  59   static const float p1 = -0.33329644f /* -3.333333333329292858E-01f */ ;
  60   static const float pone = 1.0f;
  61