k_sin.c File Reference
`#include "math_libm.h"`
`#include "math_private.h"`
Include dependency graph for k_sin.c:

Go to the source code of this file.

## Functions

double attribute_hidden | __kernel_sin (double x, double y, int iy)

## Variables

static double | half = 5.00000000000000000000e-01
static double | S1 = -1.66666666666666324348e-01
static double | S2 = 8.33333333332248946124e-03
static double | S3 = -1.98412698298579493134e-04
static double | S4 = 2.75573137070700676789e-06
static double | S5 = -2.50507602534068634195e-08
static double | S6 = 1.58969099521155010221e-10

## Function Documentation

double attribute_hidden __kernel_sin | ( | double | x,
|  | double | y,
|  | int | iy
| ) |  |

Definition at line 67 of file k_sin.c.

References GET_HIGH_WORD, half, S1, S2, S3, S4, S5, and S6.

Referenced by libm_hidden_proto().

{
double z, r, v;
int32_t ix;
GET_HIGH_WORD(ix, x);
ix &= 0x7fffffff; /* high word of x */
if (ix < 0x3e400000) { /* |x| < 2**-27 */
if ((int) x == 0)
return x;
} /* generate inexact */
z = x * x;
v = z * x;
r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6)));
if (iy == 0)
return x + v * (S1 + z * r);
else
return x - ((z * (half * y - v * r) - y) - v * S1);
}
GET_HIGH_WORD
#define GET_HIGH_WORD(i, d)
Definition: math_private.h:103
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2072
S3
static double S3
Definition: k_sin.c:57
int32_t
signed int int32_t
Definition: SDL_config_windows.h:61
x
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1567
S1
static double S1
Definition: k_sin.c:55
v
const GLdouble * v
Definition: SDL_opengl.h:2057
S4
static double S4
Definition: k_sin.c:58
y
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1567
S6
static double S6
Definition: k_sin.c:60
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:404
half
static double half
Definition: k_sin.c:54
S5
static double S5
Definition: k_sin.c:59
S2
static double S2
Definition: k_sin.c:56

## Variable Documentation

double half = 5.00000000000000000000e-01

static

Definition at line 54 of file k_sin.c.

Referenced by __kernel_sin().

double S1 = -1.66666666666666324348e-01

static

Definition at line 55 of file k_sin.c.

Referenced by __kernel_sin().

double S2 = 8.33333333332248946124e-03

static

Definition at line 56 of file k_sin.c.

Referenced by __kernel_sin().

double S3 = -1.98412698298579493134e-04

static

Definition at line 57 of file k_sin.c.

Referenced by __kernel_sin().

double S4 = 2.75573137070700676789e-06

static

Definition at line 58 of file k_sin.c.

Referenced by __kernel_sin().

double S5 = -2.50507602534068634195e-08

static

Definition at line 59 of file k_sin.c.

Referenced by __kernel_sin().

double S6 = 1.58969099521155010221e-10

static

Definition at line 60 of file k_sin.c.

Referenced by __kernel_sin().