__vatanf.c revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifdef __RESTRICT
#define restrict _Restrict
#else
#define restrict
#endif
void
{
extern const double __vlibm_TBL_atan1[];
int *pz = (int *) &z;
#ifdef UNROLL4
double conup3;
int index3;
#endif
/* Power series atan(x) = x + p1*x**3 + p2*x**5 + p3*x**7
* Error = -3.08254E-18 On the interval |x| < 1/64 */
static const float pone = 1.0f;
if (n <= 0) return; /* if no. of elements is 0 or neg, do nothing */
do
{
intf = *(int *) x; /* upper half of x, as integer */
f0 = *x;
if (intf < 0) {
}
{
if (intf > 0x7f800000)
{
}
{
}
{
index0= 2;
}
x += stridex;
y += stridey;
argcount = 0; /* initialize argcount */
if (--n <=0) break; /* we are done */
goto LOOP0; /* otherwise, examine next arg */
}
{
}
{
}
else /* |x| < 1/64 */
{
index0 = 0; /* points to 0,0 in table */
}
yaddr0 = y; /* address to store this answer */
x += stridex; /* point to next arg */
y += stridey; /* point to next result */
if (--n <=0)
{
goto UNROLL; /* finish up with 1 good arg */
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
intf = *(int *) x; /* upper half of x, as integer */
f1 = *x;
if (intf < 0) {
}
{
if (intf > 0x7f800000)
{
}
{
}
{
index1 = 2;
}
x += stridex;
y += stridey;
if (--n <=0)
{
goto UNROLL; /* finish up with 1 good arg */
}
goto LOOP1; /* otherwise, examine next arg */
}
{
}
{
}
else
{
index1 = 0; /* points to 0,0 in table */
}
yaddr1 = y; /* address to store this answer */
x += stridex; /* point to next arg */
y += stridey; /* point to next result */
if (--n <=0)
{
goto UNROLL; /* finish up with 2 good args */
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
intf = *(int *) x; /* upper half of x, as integer */
f2 = *x;
if (intf < 0) {
}
{
if (intf > 0x7f800000)
{
}
{
}
{
index2 = 2;
}
x += stridex;
y += stridey;
if (--n <=0)
{
goto UNROLL; /* finish up with 2 good args */
}
goto LOOP2; /* otherwise, examine next arg */
}
{
}
{
}
else
{
index2 = 0; /* points to 0,0 in table */
}
yaddr2 = y; /* address to store this answer */
x += stridex; /* point to next arg */
y += stridey; /* point to next result */
if (--n <=0)
{
goto UNROLL; /* finish up with 2 good args */
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
#ifdef UNROLL4
intf = *(int *) x; /* upper half of x, as integer */
f3 = *x;
if (intf < 0) {
}
{
if (intf > 0x7f800000)
{
}
{
}
{
index3 = 2;
}
x += stridex;
y += stridey;
if (--n <=0)
{
goto UNROLL; /* finish up with 3 good args */
}
goto LOOP3; /* otherwise, examine next arg */
}
{
}
{
}
else
{
index3 = 0; /* points to 0,0 in table */
}
yaddr3 = y; /* address to store this answer */
x += stridex; /* point to next arg */
y += stridey; /* point to next result */
if (--n <=0)
{
goto UNROLL; /* finish up with 3 good args */
}
#endif /* UNROLL4 */
/* here is the n-way unrolled section,
but we may actually have less than n
arguments at this point
*/
#ifdef UNROLL4
if (argcount == 4)
{
}
else
#endif
if (argcount == 3)
{
}
else
if (argcount == 2)
{
}
else
if (argcount == 1)
{
}
} while (n > 0);
}