__vcos.c revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER START
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Common Development and Distribution License (the "License").
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You may not use this file except in compliance with the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * See the License for the specific language governing permissions
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * and limitations under the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER END
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Use is subject to license terms.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis#define LO(x) *(unsigned*)x
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis#define HI(x) *(int*)x
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis#define restrict _Restrict
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis#define restrict
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Vector cosine function. Just slight modifications to vsin.8.c, mainly
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * in the primary range part.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Modification to primary range processing. If an argument that does not
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * fall in the primary range is encountered, then processing is continued
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * in the medium range.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisextern const double __vlibm_TBL_sincos_hi[], __vlibm_TBL_sincos_lo[];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisstatic const double
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis invpio2 = 0.636619772367581343075535, /* 53 bits of pi/2 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pio2_1 = 1.570796326734125614166, /* first 33 bits of pi/2 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pio2_2 = 6.077100506303965976596e-11, /* second 33 bits of pi/2 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pio2_3 = 2.022266248711166455796e-21, /* third 33 bits of pi/2 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pio2_3t = 8.478427660368899643959e-32, /* pi/2 - pio2_3 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pp1 = -1.666666666605760465276263943134982554676e-0001,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis pp2 = 8.333261209690963126718376566146180944442e-0003,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis qq1 = -4.999999999977710986407023955908711557870e-0001,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis qq2 = 4.166654863857219350645055881018842089580e-0002,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis poly1[2]= { -1.666666666666629669805215138920301589656e-0001,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -4.999999999999931701464060878888294524481e-0001 },
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis poly2[2]= { 8.333333332390951295683993455280336376663e-0003,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis 4.166666666394861917535640593963708222319e-0002 },
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis poly3[2]= { -1.984126237997976692791551778230098403960e-0004,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis -1.388888552656142867832756687736851681462e-0003 },
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis poly4[2]= { 2.753403624854277237649987622848330351110e-0006,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis 2.478519423681460796618128289454530524759e-0005 };
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisstatic const unsigned thresh[2] = { 0x3fc90000, 0x3fc40000 };
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis/* Don't __ the following; acomp will handle it */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisextern double fabs(double);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisextern void __vlibm_vcos_big(int, double *, int, double *, int, int);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * y[i*stridey] := cos( x[i*stridex] ), for i = 0..n.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Calls __vlibm_vcos_big to handle all elts which have abs >~ 1.647e+06.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Argument reduction is done here for elts pi/4 < arg < 1.647e+06.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * elts < 2^-27 use the approximation 1.0 ~ cos(x).
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis__vcos(int n, double * restrict x, int stridex, double * restrict y,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis double x0_or_one[4], x1_or_one[4], x2_or_one[4];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis double y0_or_zero[4], y1_or_zero[4], y2_or_zero[4];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis double x0, x1, x2, *py0 = 0, *py1 = 0, *py2, *xsave, *ysave;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis unsigned hx0, hx1, hx2, xsb0, xsb1 = 0, xsb2;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis do /* MAIN LOOP */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis /* Gotos here so _break_ exits MAIN LOOP. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisLOOP0: /* Find first arg in right range. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis xsb0 = HI(x); /* get most significant word */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis hx0 = xsb0 & ~0x80000000; /* mask off sign bit */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis /* Too big: arg reduction needed, so leave for second part */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis /* Too small. cos x ~ 1. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr JasiukajtisLOOP1: /* Get second arg, same as above. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * 0x3fc40000 = 5/32 ~ 0.15625
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Get msb after subtraction. Will be 1 only if
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * hx0 - 5/32 is negative.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis case 0: /* All are > 5/32 */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis a0 = __vlibm_TBL_sincos_hi[j0+1]; /* cos_hi(t) */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis /* cos_lo(t) sin_hi(t) */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = __vlibm_TBL_sincos_lo[j0+1] - (__vlibm_TBL_sincos_hi[j0+xsb0]*w0 - a0*t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = __vlibm_TBL_sincos_lo[j1+1] - (__vlibm_TBL_sincos_hi[j1+xsb1]*w1 - a1*t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = __vlibm_TBL_sincos_lo[j2+1] - (__vlibm_TBL_sincos_hi[j2+xsb2]*w2 - a2*t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[1] + z0 * (poly2[1] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = __vlibm_TBL_sincos_lo[j1+1] - (__vlibm_TBL_sincos_hi[j1+xsb1]*w1 - a1*t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = __vlibm_TBL_sincos_lo[j2+1] - (__vlibm_TBL_sincos_hi[j2+xsb2]*w2 - a2*t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[1] + z1 * (poly2[1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = __vlibm_TBL_sincos_lo[j0+1] - (__vlibm_TBL_sincos_hi[j0+xsb0]*w0 - a0*t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = __vlibm_TBL_sincos_lo[j2+1] - (__vlibm_TBL_sincos_hi[j2+xsb2]*w2 - a2*t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[1] + z0 * (poly2[1] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[1] + z1 * (poly2[1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = __vlibm_TBL_sincos_lo[j2+1] - (__vlibm_TBL_sincos_hi[j2+xsb2]*w2 - a2*t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[1] + z2 * (poly2[1] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = __vlibm_TBL_sincos_lo[j0+1] - (__vlibm_TBL_sincos_hi[j0+xsb0]*w0 - a0*t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = __vlibm_TBL_sincos_lo[j1+1] - (__vlibm_TBL_sincos_hi[j1+xsb1]*w1 - a1*t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[1] + z0 * (poly2[1] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[1] + z2 * (poly2[1] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = __vlibm_TBL_sincos_lo[j1+1] - (__vlibm_TBL_sincos_hi[j1+xsb1]*w1 - a1*t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[1] + z1 * (poly2[1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[1] + z2 * (poly2[1] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = __vlibm_TBL_sincos_lo[j0+1] - (__vlibm_TBL_sincos_hi[j0+xsb0]*w0 - a0*t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[1] + z0 * (poly2[1] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[1] + z1 * (poly2[1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[1] + z2 * (poly2[1] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis } while (--n > 0); /* END MAIN LOOP */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CLEAN UP last 0, 1, or 2 elts.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis if (i > 0) /* Clean up elts at tail. i < 3. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[1] + z1 * (poly2[1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis - (__vlibm_TBL_sincos_hi[j1+xsb1]*w1 - a1*t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[1] + z0 * (poly2[1] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = __vlibm_TBL_sincos_lo[j0+1] - (__vlibm_TBL_sincos_hi[j0+xsb0]*w0 - a0*t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis } /* END CLEAN UP */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Take care of BIGUNS.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * We have jumped here in the middle of processing after having
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * encountered a medium range argument. Therefore things are in a
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * bit of a tizzy.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis double fn0, fn1, fn2, a0, a1, a2, w0, w1, w2, y0, y1, y2;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Find 3 more to work on: Not already done, not too big.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis if (hx > 0x413921fb) /* (1.6471e+06) Too big: leave it. */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis n0 = (n0 + 1) & 3; /* Add 1 (before the mod) to make sin into cos */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis i = ((xsb0 & ~0x80000000) - thresh[n0&1]) >> 31;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis i |= (((xsb1 & ~0x80000000) - thresh[n1&1]) >> 30) & 2;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis i |= (((xsb2 & ~0x80000000) - thresh[n2&1]) >> 29) & 4;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = (__vlibm_TBL_sincos_hi[j0+((n0+xsb0)&3)] * w0 + a0 * t0) + __vlibm_TBL_sincos_lo[j0+n0];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = (__vlibm_TBL_sincos_hi[j1+((n1+xsb1)&3)] * w1 + a1 * t1) + __vlibm_TBL_sincos_lo[j1+n1];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = (__vlibm_TBL_sincos_hi[j2+((n2+xsb2)&3)] * w2 + a2 * t2) + __vlibm_TBL_sincos_lo[j2+n2];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[j0] + z0 * (poly2[j0] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = x0_or_one[n0] + (y0_or_zero[n0] + x0_or_one[n0] * t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = (__vlibm_TBL_sincos_hi[j1+((n1+xsb1)&3)] * w1 + a1 * t1) + __vlibm_TBL_sincos_lo[j1+n1];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = (__vlibm_TBL_sincos_hi[j2+((n2+xsb2)&3)] * w2 + a2 * t2) + __vlibm_TBL_sincos_lo[j2+n2];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[j1] + z1 * (poly2[j1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = (__vlibm_TBL_sincos_hi[j0+((n0+xsb0)&3)] * w0 + a0 * t0) + __vlibm_TBL_sincos_lo[j0+n0];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = x1_or_one[n1] + (y1_or_zero[n1] + x1_or_one[n1] * t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = (__vlibm_TBL_sincos_hi[j2+((n2+xsb2)&3)] * w2 + a2 * t2) + __vlibm_TBL_sincos_lo[j2+n2];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[j0] + z0 * (poly2[j0] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[j1] + z1 * (poly2[j1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j2 = (((j2 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = x0_or_one[n0] + (y0_or_zero[n0] + x0_or_one[n0] * t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = x1_or_one[n1] + (y1_or_zero[n1] + x1_or_one[n1] * t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = (__vlibm_TBL_sincos_hi[j2+((n2+xsb2)&3)] * w2 + a2 * t2) + __vlibm_TBL_sincos_lo[j2+n2];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[j2] + z2 * (poly2[j2] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = (__vlibm_TBL_sincos_hi[j0+((n0+xsb0)&3)] * w0 + a0 * t0) + __vlibm_TBL_sincos_lo[j0+n0];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = (__vlibm_TBL_sincos_hi[j1+((n1+xsb1)&3)] * w1 + a1 * t1) + __vlibm_TBL_sincos_lo[j1+n1];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = x2_or_one[n2] + (y2_or_zero[n2] + x2_or_one[n2] * t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[j0] + z0 * (poly2[j0] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[j2] + z2 * (poly2[j2] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = x0_or_one[n0] + (y0_or_zero[n0] + x0_or_one[n0] * t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = (__vlibm_TBL_sincos_hi[j1+((n1+xsb1)&3)] * w1 + a1 * t1) + __vlibm_TBL_sincos_lo[j1+n1];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = x2_or_one[n2] + (y2_or_zero[n2] + x2_or_one[n2] * t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[j1] + z1 * (poly2[j1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[j2] + z2 * (poly2[j2] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = (__vlibm_TBL_sincos_hi[j0+((n0+xsb0)&3)] * w0 + a0 * t0) + __vlibm_TBL_sincos_lo[j0+n0];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = x1_or_one[n1] + (y1_or_zero[n1] + x1_or_one[n1] * t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = x2_or_one[n2] + (y2_or_zero[n2] + x2_or_one[n2] * t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[j0] + z0 * (poly2[j0] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[j1] + z1 * (poly2[j1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = z2 * (poly1[j2] + z2 * (poly2[j2] + t2));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = x0_or_one[n0] + (y0_or_zero[n0] + x0_or_one[n0] * t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = x1_or_one[n1] + (y1_or_zero[n1] + x1_or_one[n1] * t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t2 = x2_or_one[n2] + (y2_or_zero[n2] + x2_or_one[n2] * t2);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis } while (--n > 0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis n1 = (n1 + 1) & 3; /* Add 1 (before the mod) to make sin into cos */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = z1 * (poly1[j1] + z1 * (poly2[j1] + t1));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = x1_or_one[n1] + (y1_or_zero[n1] + x1_or_one[n1] * t1);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j1 = (((j1 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t1 = (__vlibm_TBL_sincos_hi[j1+((n1+xsb1)&3)] * w1 + a1 * t1) + __vlibm_TBL_sincos_lo[j1+n1];
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis n0 = (n0 + 1) & 3; /* Add 1 (before the mod) to make sin into cos */
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = z0 * (poly1[j0] + z0 * (poly2[j0] + t0));
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = x0_or_one[n0] + (y0_or_zero[n0] + x0_or_one[n0] * t0);
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis j0 = (((j0 & ~0x80000000) - 0x3fc40000) >> 13) & ~0x3;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis t0 = (__vlibm_TBL_sincos_hi[j0+((n0+xsb0)&3)] * w0 + a0 * t0) + __vlibm_TBL_sincos_lo[j0+n0];