diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-03-02 09:33:42 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-03-02 09:33:42 +0000 |
commit | 9feea8b823c069addfda8b43e0c14c7f46d5be19 (patch) | |
tree | 3b919f10a9486ca3469576d063409d5af42b7c1a /native/fdlibm/s_tan.c | |
parent | 789bb86a1bfe9953bfeb6b5d9b08aaf58fd6e108 (diff) | |
download | classpath-9feea8b823c069addfda8b43e0c14c7f46d5be19.tar.gz |
2006-03-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD-->generics-branch for the period between
the 0.20 release and the tag generics-merge-20050225.
Diffstat (limited to 'native/fdlibm/s_tan.c')
-rw-r--r-- | native/fdlibm/s_tan.c | 58 |
1 files changed, 8 insertions, 50 deletions
diff --git a/native/fdlibm/s_tan.c b/native/fdlibm/s_tan.c index 20995fcbd..1f5564bce 100644 --- a/native/fdlibm/s_tan.c +++ b/native/fdlibm/s_tan.c @@ -1,54 +1,16 @@ -/* @(#)s_tan.c 5.1 93/09/24 */ +/* @(#)s_tan.c 1.3 95/01/18 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * - * Developed at SunPro, a Sun Microsystems, Inc. business. + * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ - -/* - -FUNCTION - <<tan>>, <<tanf>>---tangent - -INDEX -tan -INDEX -tanf - -ANSI_SYNOPSIS - #include <math.h> - double tan(double <[x]>); - float tanf(float <[x]>); - -TRAD_SYNOPSIS - #include <math.h> - double tan(<[x]>) - double <[x]>; - - float tanf(<[x]>) - float <[x]>; - - -DESCRIPTION -<<tan>> computes the tangent of the argument <[x]>. -Angles are specified in radians. - -<<tanf>> is identical, save that it takes and returns <<float>> values. - -RETURNS -The tangent of <[x]> is returned. - -PORTABILITY -<<tan>> is ANSI. <<tanf>> is an extension. -*/ - /* tan(x) * Return tangent function of x. * @@ -57,8 +19,8 @@ PORTABILITY * __ieee754_rem_pio2 ... argument reduction routine * * Method. - * Let S,C and T denote the sin, cos and tan respectively on - * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 * in [-pi/4 , +pi/4], and let n = k mod 4. * We have * @@ -76,13 +38,11 @@ PORTABILITY * trig(NaN) is that NaN; * * Accuracy: - * TRIG(x) returns trig(x) nearly rounded + * TRIG(x) returns trig(x) nearly rounded */ #include "fdlibm.h" -#ifndef _DOUBLE_IS_32BITS - #ifdef __STDC__ double tan(double x) #else @@ -91,10 +51,10 @@ PORTABILITY #endif { double y[2],z=0.0; - int32_t n,ix; + int n, ix; /* High word of x. */ - GET_HIGH_WORD(ix,x); + ix = __HI(x); /* |x| ~< pi/4 */ ix &= 0x7fffffff; @@ -110,5 +70,3 @@ PORTABILITY -1 -- n odd */ } } - -#endif /* _DOUBLE_IS_32BITS */ |