Print this page




 200         res0 += (DONE - res0_hi * res0 - res0_lo * res0) * dres0;                               \
 201         res0 = sqrt ( res0 );                                                                   \
 202                                                                                                 \
 203         res0 = D2ON1022 * res0;                                                                 \
 204         RETURN (I, res0)                                                                        \
 205 }                                                                                               \
 206 j0 = hy##I - (diff0 & j0);                                                                  \
 207 j0 &= 0x7ff00000;                                                                           \
 208 HI(&scl##I) = 0x7ff00000 - j0;
 209 
 210 void
 211 __vrhypot( int n, double * restrict px, int stridex, double * restrict py,
 212         int stridey, double * restrict pz, int stridez )
 213 {
 214         int             i = 0;
 215         double          x, y;
 216         double          x_hi0, x_lo0, y_hi0, y_lo0, scl0 = 0;
 217         double          x0, y0, res0, dd0;
 218         double          res0_hi,res0_lo, dres0;
 219         double          x_hi1, x_lo1, y_hi1, y_lo1, scl1 = 0;
 220         double          x1, y1, res1, dd1;
 221         double          res1_hi,res1_lo, dres1;
 222         double          x_hi2, x_lo2, y_hi2, y_lo2, scl2 = 0;
 223         double          x2, y2, res2, dd2;
 224         double          res2_hi,res2_lo, dres2;
 225 
 226         int             hx0, hy0, j0, diff0;
 227         int             iarr0, iexp0, itbl0;
 228         int             hx1, hy1;
 229         int             iarr1, iexp1, itbl1;
 230         int             hx2, hy2;
 231         int             iarr2, iexp2, itbl2;
 232 
 233         int             lx, ly;
 234 
 235         double          DONE = ((double*)LCONST)[0];
 236         double          DTWO = ((double*)LCONST)[1];
 237         double          D2ON36 = ((double*)LCONST)[2];
 238         double          D2ON1022 = ((double*)LCONST)[3];
 239         double          D2ONM52 = ((double*)LCONST)[4];
 240 
 241         double          *pz0, *pz1, *pz2;
 242 
 243         do
 244         {
 245 start0:
 246                 PREP(0)
 247                 px += stridex;
 248                 py += stridey;
 249                 pz += stridez;
 250                 i = 1;
 251                 if ( --n <= 0 )
 252                         break;
 253 
 254 start1:
 255                 PREP(1)
 256                 px += stridex;
 257                 py += stridey;
 258                 pz += stridez;
 259                 i = 2;
 260                 if ( --n <= 0 )
 261                         break;




 200         res0 += (DONE - res0_hi * res0 - res0_lo * res0) * dres0;                               \
 201         res0 = sqrt ( res0 );                                                                   \
 202                                                                                                 \
 203         res0 = D2ON1022 * res0;                                                                 \
 204         RETURN (I, res0)                                                                        \
 205 }                                                                                               \
 206 j0 = hy##I - (diff0 & j0);                                                                  \
 207 j0 &= 0x7ff00000;                                                                           \
 208 HI(&scl##I) = 0x7ff00000 - j0;
 209 
 210 void
 211 __vrhypot( int n, double * restrict px, int stridex, double * restrict py,
 212         int stridey, double * restrict pz, int stridez )
 213 {
 214         int             i = 0;
 215         double          x, y;
 216         double          x_hi0, x_lo0, y_hi0, y_lo0, scl0 = 0;
 217         double          x0, y0, res0, dd0;
 218         double          res0_hi,res0_lo, dres0;
 219         double          x_hi1, x_lo1, y_hi1, y_lo1, scl1 = 0;
 220         double          x1 = 0.0L, y1 = 0.0L, res1, dd1;
 221         double          res1_hi,res1_lo, dres1;
 222         double          x_hi2, x_lo2, y_hi2, y_lo2, scl2 = 0;
 223         double          x2, y2, res2, dd2;
 224         double          res2_hi,res2_lo, dres2;
 225 
 226         int             hx0, hy0, j0, diff0;
 227         int             iarr0, iexp0, itbl0;
 228         int             hx1, hy1;
 229         int             iarr1, iexp1, itbl1;
 230         int             hx2, hy2;
 231         int             iarr2, iexp2, itbl2;
 232 
 233         int             lx, ly;
 234 
 235         double          DONE = ((double*)LCONST)[0];
 236         double          DTWO = ((double*)LCONST)[1];
 237         double          D2ON36 = ((double*)LCONST)[2];
 238         double          D2ON1022 = ((double*)LCONST)[3];
 239         double          D2ONM52 = ((double*)LCONST)[4];
 240 
 241         double          *pz0, *pz1 = 0, *pz2;
 242 
 243         do
 244         {
 245 start0:
 246                 PREP(0)
 247                 px += stridex;
 248                 py += stridey;
 249                 pz += stridez;
 250                 i = 1;
 251                 if ( --n <= 0 )
 252                         break;
 253 
 254 start1:
 255                 PREP(1)
 256                 px += stridex;
 257                 py += stridey;
 258                 pz += stridez;
 259                 i = 2;
 260                 if ( --n <= 0 )
 261                         break;