]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Math/s_tan.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / StdLib / LibC / Math / s_tan.c
diff --git a/StdLib/LibC/Math/s_tan.c b/StdLib/LibC/Math/s_tan.c
deleted file mode 100644 (file)
index 6c2a26d..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* @(#)s_tan.c 5.1 93/09/24 */\r
-/*\r
- * ====================================================\r
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\r
- *\r
- * Developed at SunPro, a Sun Microsystems, Inc. business.\r
- * Permission to use, copy, modify, and distribute this\r
- * software is freely granted, provided that this notice\r
- * is preserved.\r
- * ====================================================\r
- */\r
-#include  <LibConfig.h>\r
-#include  <sys/EfiCdefs.h>\r
-#if defined(LIBM_SCCS) && !defined(lint)\r
-__RCSID("$NetBSD: s_tan.c,v 1.10 2002/05/26 22:01:58 wiz Exp $");\r
-#endif\r
-\r
-/* tan(x)\r
- * Return tangent function of x.\r
- *\r
- * kernel function:\r
- *  __kernel_tan    ... tangent function on [-pi/4,pi/4]\r
- *  __ieee754_rem_pio2  ... argument reduction routine\r
- *\r
- * Method.\r
- *      Let S,C and T denote the sin, cos and tan respectively on\r
- *  [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2\r
- *  in [-pi/4 , +pi/4], and let n = k mod 4.\r
- *  We have\r
- *\r
- *          n        sin(x)      cos(x)        tan(x)\r
- *     ----------------------------------------------------------\r
- *      0        S     C     T\r
- *      1        C    -S    -1/T\r
- *      2       -S    -C     T\r
- *      3       -C     S    -1/T\r
- *     ----------------------------------------------------------\r
- *\r
- * Special cases:\r
- *      Let trig be any of sin, cos, or tan.\r
- *      trig(+-INF)  is NaN, with signals;\r
- *      trig(NaN)    is that NaN;\r
- *\r
- * Accuracy:\r
- *  TRIG(x) returns trig(x) nearly rounded\r
- */\r
-\r
-#include "math.h"\r
-#include "math_private.h"\r
-\r
-double\r
-tan(double x)\r
-{\r
-  double y[2],z=0.0;\r
-  int32_t n, ix;\r
-\r
-    /* High word of x. */\r
-  GET_HIGH_WORD(ix,x);\r
-\r
-    /* |x| ~< pi/4 */\r
-  ix &= 0x7fffffff;\r
-  if(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);\r
-\r
-    /* tan(Inf or NaN) is NaN */\r
-  else if (ix>=0x7ff00000) return x-x;    /* NaN */\r
-\r
-    /* argument reduction needed */\r
-  else {\r
-      n = __ieee754_rem_pio2(x,y);\r
-      return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /*   1 -- n even\r
-              -1 -- n odd */\r
-  }\r
-}\r