ReactOS 0.4.17-dev-1321-g5c122a9
tan.c File Reference
#include "libm.h"
Include dependency graph for tan.c:

Go to the source code of this file.

Functions

double tan (double x)
 

Function Documentation

◆ tan()

double tan ( double  x)

Definition at line 58 of file tan.c.

59{
60 double y[2];
61 uint32_t ix;
62 unsigned n;
63
64 GET_HIGH_WORD(ix, x);
65 ix &= 0x7fffffff;
66
67 /* |x| ~< pi/4 */
68 if (ix <= 0x3fe921fb) {
69 if (ix < 0x3e400000) { /* |x| < 2**-27 */
70 /* raise inexact if x!=0 and underflow if subnormal */
71 FORCE_EVAL(ix < 0x00100000 ? x/0x1p120f : x+0x1p120f);
72 return x;
73 }
74 return __tan(x, 0.0, 0);
75 }
76
77 /* tan(Inf or NaN) is NaN */
78 if (ix >= 0x7ff00000)
79 return x - x;
80
81 /* argument reduction */
82 n = __rem_pio2(x, y);
83 return __tan(y[0], y[1], n&1);
84}
int __rem_pio2(double x, double *y)
Definition: __rem_pio2.c:59
double __tan(double x, double y, int odd)
Definition: __tan.c:76
UINT32 uint32_t
Definition: types.h:75
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble n
Definition: glext.h:7729
#define GET_HIGH_WORD(i, d)
Definition: ieee754.h:26
#define FORCE_EVAL(x)
Definition: libm.h:64

Referenced by __libm_sse2_tan(), __libm_sse2_tanf(), _CItan(), _libm_sse2_tan_precise(), app_boundary_point(), D2D1MakeSkewMatrix(), GdipCreateLineBrushFromRectWithAngle(), Global_Tan(), init_layer3(), Math_tan(), rpn_tan(), SkewDIB(), tanf(), tanl(), Test_tan_approx(), Test_tan_exact(), and ValarrayTest::transcendentals().