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 const double | half = 5.00000000000000000000e-01
static const double | S1 = -1.66666666666666324348e-01
static const double | S2 = 8.33333333332248946124e-03
static const double | S3 = -1.98412698298579493134e-04
static const double | S4 = 2.75573137070700676789e-06
static const double | S5 = -2.50507602534068634195e-08
static const double | S6 = 1.58969099521155010221e-10

## Function Documentation

## __kernel_sin()

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

Definition at line 52 of file k_sin.c.

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

Referenced by cos(), and sin().

{
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:108
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:404
S3
static const double S3
Definition: k_sin.c:47
v
const GLdouble * v
Definition: SDL_opengl.h:2064
x
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
int32_t
signed int int32_t
Definition: SDL_config_windows.h:62
S6
static const double S6
Definition: k_sin.c:50
S4
static const double S4
Definition: k_sin.c:48
half
static const double half
Definition: k_sin.c:44
y
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
S2
static const double S2
Definition: k_sin.c:46
S1
static const double S1
Definition: k_sin.c:45
S5
static const double S5
Definition: k_sin.c:49

## Variable Documentation

## half

const double half = 5.00000000000000000000e-01

static

Definition at line 44 of file k_sin.c.

Referenced by __kernel_sin().

## S1

const double S1 = -1.66666666666666324348e-01

static

Definition at line 45 of file k_sin.c.

Referenced by __kernel_sin().

## S2

const double S2 = 8.33333333332248946124e-03

static

Definition at line 46 of file k_sin.c.

Referenced by __kernel_sin().

## S3

const double S3 = -1.98412698298579493134e-04

static

Definition at line 47 of file k_sin.c.

Referenced by __kernel_sin().

## S4

const double S4 = 2.75573137070700676789e-06

static

Definition at line 48 of file k_sin.c.

Referenced by __kernel_sin().

## S5

const double S5 = -2.50507602534068634195e-08

static

Definition at line 49 of file k_sin.c.

Referenced by __kernel_sin().

## S6

const double S6 = 1.58969099521155010221e-10

static

Definition at line 50 of file k_sin.c.

Referenced by __kernel_sin().