30 #ifndef AMATH_LIB_REAL_PRIM_H 31 #define AMATH_LIB_REAL_PRIM_H 48 #define TRIG_INEXACT(x) ((x >= 0.0
&& x < 1e-15
) || (x <= 0.0
&& x > -1e-15
)) 53 int __kernel_rem_pio2(
double* x,
double* y,
int e0,
int nx,
int prec,
const int* ipio2);
56 #if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN) 57 #if defined(__arm__) || defined(__ARM_ARCH_2__) || 58 defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) || 59 defined(__ARM_ARCH_4T__) || defined(__TARGET_ARM_4T) || 60 defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5E__) || 61 defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) || 62 defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || 63 defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || 64 defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) || 65 defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || 66 defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || 67 defined(__ARM_ARCH_7S_) || defined(__ARM_ARCH_5TEJ__) || 68 defined(_M_ARM) || defined(ARMCPU) || 70 #define __IEEE_LITTLE_ENDIAN 75 #if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN) 76 #if defined(mc68000) || defined(__mc68000) || defined(_M68000) || 77 defined(mc68020) || defined(__mc68020) || defined(_M68020) || 78 defined(mc68030) || defined(__mc68030) || defined(_M68030) || 79 defined(mc68040) || defined(__mc68040) || defined(_M68040) || 80 defined(mc68060) || defined(__mc68060) || defined(_M68060) || 82 #define __IEEE_BIG_ENDIAN 87 #if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN) 88 #if defined(i386) || defined(__i386) || defined(__i386__) || 89 defined(i386) || defined(__i486) || defined(__i486__) || 90 defined(i386) || defined(__i586) || defined(__i586__) || 91 defined(i386) || defined(__i686) || defined(__i686__) || 92 defined(x86) || defined(intel) || defined(i86pc) || 93 defined(_M_IX86) || defined(_M_AMD64) || defined(__x86_64__
) || 95 #define __IEEE_LITTLE_ENDIAN 100 #if !defined(__IEEE_LITTLE_ENDIAN
) && !defined(__IEEE_BIG_ENDIAN) 101 #if defined(__alpha) || defined(__osf__) 102 #define __IEEE_LITTLE_ENDIAN 107 #if !defined(__IEEE_LITTLE_ENDIAN
) && !defined(__IEEE_BIG_ENDIAN) 108 #if defined(PPCCPU) || defined(__PPC__) || 109 defined(__powerpc__) || defined(__powerpc64__) 110 defined(__mips__) || defined(__mips) 111 #define __IEEE_BIG_ENDIAN 115 #ifndef __IEEE_BIG_ENDIAN 116 #ifndef __IEEE_LITTLE_ENDIAN
117 #error Must define endianness 121 #ifdef __IEEE_BIG_ENDIAN 134 } ieee_double_shape_type;
137 #ifdef __IEEE_LITTLE_ENDIAN
150 } ieee_double_shape_type;
156 #define EXTRACT_WORDS(ix0,ix1,d) 158 ieee_double_shape_type ew_u; 160 (ix0) = ew_u.parts.msw; 161 (ix1) = ew_u.parts.lsw; 167 #define GET_HIGH_WORD(i,d) 169 ieee_double_shape_type gh_u; 171 (i) = gh_u.parts.msw; 177 #define GET_LOW_WORD(i,d) 179 ieee_double_shape_type gl_u; 181 (i) = gl_u.parts.lsw; 187 #define INSERT_WORDS(d,ix0,ix1) 189 ieee_double_shape_type iw_u; 190 iw_u.parts.msw = (ix0); 191 iw_u.parts.lsw = (ix1); 198 #define SET_HIGH_WORD(d,v) 200 ieee_double_shape_type sh_u; 202 sh_u.parts.msw = (v); 209 #define SET_LOW_WORD(d,v) 211 ieee_double_shape_type sl_u; 213 sl_u.parts.lsw = (v); double __kernel_cos(double x, double y)
Kernel cosine function.
double __kernel_sin(double x, double y, int iy)
Kernel sin function.
double __kernel_tan(double x, double y, int iy)
Kernel tan function.
int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2)
Kernel reduction function.