__vcosbig.c revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * CDDL HEADER START
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * The contents of this file are subject to the terms of the
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Common Development and Distribution License (the "License").
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * You may not use this file except in compliance with the License.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * See the License for the specific language governing permissions
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * and limitations under the License.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * When distributing Covered Code, include this CDDL HEADER in each
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * If applicable, add the following below this CDDL HEADER, with the
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * fields enclosed by brackets "[]" replaced with your own identifying
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * information: Portions Copyright [yyyy] [name of copyright owner]
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * CDDL HEADER END
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Use is subject to license terms.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs#define LO(x) *(unsigned*)x
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs#define HI(x) *(int*)x
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs#define restrict _Restrict
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs#define restrict
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphsextern const double __vlibm_TBL_sincos_hi[], __vlibm_TBL_sincos_lo[];
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphsextern int __vlibm_rem_pio2m(double *, double *, int, int, int);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphsstatic const double
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs pp1 = -1.666666666605760465276263943134982554676e-0001,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs pp2 = 8.333261209690963126718376566146180944442e-0003,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs p1 = -1.666666666666629669805215138920301589656e-0001,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs p2 = 8.333333332390951295683993455280336376663e-0003,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs p3 = -1.984126237997976692791551778230098403960e-0004,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs qq1 = -4.999999999977710986407023955908711557870e-0001,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs qq2 = 4.166654863857219350645055881018842089580e-0002,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs q1 = -4.999999999999931701464060878888294524481e-0001,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs q2 = 4.166666666394861917535640593963708222319e-0002,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs q3 = -1.388888552656142867832756687736851681462e-0003,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs q4 = 2.478519423681460796618128289454530524759e-0005;
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs__vlibm_vcos_big(int n, double * restrict x, int stridex, double * restrict y,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs /* now nx and ty[*] are the quadrant and reduced arg */
0c45178b5714d692c44817c2235320c3f2b030abwl t = __vlibm_TBL_sincos_lo[j+1] - (__vlibm_TBL_sincos_hi[j] * w - a * t);
0c45178b5714d692c44817c2235320c3f2b030abwl t = (__vlibm_TBL_sincos_hi[j+1] * w + a * t) + __vlibm_TBL_sincos_lo[j];
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs if (xsb) a = -a;