SDL  2.0
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

◆ __kernel_sin()

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().

71 {
72  double z, r, v;
73  int32_t ix;
74  GET_HIGH_WORD(ix, x);
75  ix &= 0x7fffffff; /* high word of x */
76  if (ix < 0x3e400000) { /* |x| < 2**-27 */
77  if ((int) x == 0)
78  return x;
79  } /* generate inexact */
80  z = x * x;
81  v = z * x;
82  r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6)));
83  if (iy == 0)
84  return x + v * (S1 + z * r);
85  else
86  return x - ((z * (half * y - v * r) - y) - v * S1);
87 }
#define GET_HIGH_WORD(i, d)
Definition: math_private.h:103
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2072
static double S3
Definition: k_sin.c:57
signed int int32_t
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1567
static double S1
Definition: k_sin.c:55
const GLdouble * v
Definition: SDL_opengl.h:2057
static double S4
Definition: k_sin.c:58
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1567
static double S6
Definition: k_sin.c:60
GLdouble GLdouble z
static double half
Definition: k_sin.c:54
static double S5
Definition: k_sin.c:59
static double S2
Definition: k_sin.c:56

Variable Documentation

◆ half

double half = 5.00000000000000000000e-01
static

Definition at line 54 of file k_sin.c.

Referenced by __kernel_sin().

◆ S1

double S1 = -1.66666666666666324348e-01
static

Definition at line 55 of file k_sin.c.

Referenced by __kernel_sin().

◆ S2

double S2 = 8.33333333332248946124e-03
static

Definition at line 56 of file k_sin.c.

Referenced by __kernel_sin().

◆ S3

double S3 = -1.98412698298579493134e-04
static

Definition at line 57 of file k_sin.c.

Referenced by __kernel_sin().

◆ S4

double S4 = 2.75573137070700676789e-06
static

Definition at line 58 of file k_sin.c.

Referenced by __kernel_sin().

◆ S5

double S5 = -2.50507602534068634195e-08
static

Definition at line 59 of file k_sin.c.

Referenced by __kernel_sin().

◆ S6

double S6 = 1.58969099521155010221e-10
static

Definition at line 60 of file k_sin.c.

Referenced by __kernel_sin().