17#ifndef _MATH_PRIVATE_H_
18#define _MATH_PRIVATE_H_
20#include "../inc/openlibm_defs.h"
21#include "../inc/cdefs-compat.h"
22#include "../inc/types-compat.h"
45#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
63#if __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
83#define EXTRACT_WORDS(ix0,ix1,d) \
85 ieee_double_shape_type ew_u; \
87 (ix0) = ew_u.parts.msw; \
88 (ix1) = ew_u.parts.lsw; \
92#define EXTRACT_WORD64(ix,d) \
94 ieee_double_shape_type ew_u; \
96 (ix) = ew_u.xparts.w; \
101#define GET_HIGH_WORD(i,d) \
103 ieee_double_shape_type gh_u; \
105 (i) = gh_u.parts.msw; \
110#define GET_LOW_WORD(i,d) \
112 ieee_double_shape_type gl_u; \
114 (i) = gl_u.parts.lsw; \
119#define INSERT_WORDS(d,ix0,ix1) \
121 ieee_double_shape_type iw_u; \
122 iw_u.parts.msw = (ix0); \
123 iw_u.parts.lsw = (ix1); \
128#define INSERT_WORD64(d,ix) \
130 ieee_double_shape_type iw_u; \
131 iw_u.xparts.w = (ix); \
137#define SET_HIGH_WORD(d,v) \
139 ieee_double_shape_type sh_u; \
141 sh_u.parts.msw = (v); \
147#define SET_LOW_WORD(d,v) \
149 ieee_double_shape_type sl_u; \
151 sl_u.parts.lsw = (v); \
169#define GET_FLOAT_WORD(i,d) \
171 ieee_float_shape_type gf_u; \
178#define SET_FLOAT_WORD(d,i) \
180 ieee_float_shape_type sf_u; \
187#define GET_LDBL_EXPSIGN(i,d) \
189 union IEEEl2bits ge_u; \
191 (i) = ge_u.xbits.expsign; \
196#define SET_LDBL_EXPSIGN(d,v) \
198 union IEEEl2bits se_u; \
200 se_u.xbits.expsign = (v); \
206#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
208#ifdef FLT_EVAL_METHOD
210#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
211#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
213#define STRICT_ASSIGN(type, lval, rval) do { \
214 volatile type __lval; \
216 if (sizeof(type) >= sizeof(long double)) \
248#define nan_mix(x, y) (((x) + 0.0L) + ((y) + 0))
260 __asm__(
"cvtsd2si %1,%0" :
"=r" (n) :
"x" (x));
263#define HAVE_EFFICIENT_IRINT
272 __asm__(
"fistl %0" :
"=m" (n) :
"t" (x));
275#define HAVE_EFFICIENT_IRINT
286#define __ieee754_sqrt c_sqrt
287#define __ieee754_acos c_acos
288#define __ieee754_acosh c_acosh
289#define __ieee754_log c_log
290#define __ieee754_log2 c_log2
291#define __ieee754_atanh c_atanh
292#define __ieee754_asin c_asin
293#define __ieee754_atan2 c_atan2
294#define __ieee754_exp c_exp
295#define __ieee754_cosh c_cosh
296#define __ieee754_fmod c_fmod
297#define __ieee754_pow c_pow
298#define __ieee754_lgamma c_lgamma
299#define __ieee754_lgamma_r c_lgamma_r
300#define __ieee754_log10 c_log10
301#define __ieee754_sinh c_sinh
302#define __ieee754_hypot c_hypot
303#define __ieee754_j0 c_j0
304#define __ieee754_j1 c_j1
305#define __ieee754_y0 c_y0
306#define __ieee754_y1 c_y1
307#define __ieee754_jn c_jn
308#define __ieee754_yn c_yn
309#define __ieee754_remainder c_remainder
310#define __ieee754_sqrtf c_sqrtf
311#define __ieee754_acosf c_acosf
312#define __ieee754_acoshf c_acoshf
313#define __ieee754_logf c_logf
314#define __ieee754_atanhf c_atanhf
315#define __ieee754_asinf c_asinf
316#define __ieee754_atan2f c_atan2f
317#define __ieee754_expf c_expf
318#define __ieee754_coshf c_coshf
319#define __ieee754_fmodf c_fmodf
320#define __ieee754_powf c_powf
321#define __ieee754_lgammaf c_lgammaf
322#define __ieee754_lgammaf_r c_lgammaf_r
323#define __ieee754_log10f c_log10f
324#define __ieee754_log2f c_log2f
325#define __ieee754_sinhf c_sinhf
326#define __ieee754_hypotf c_hypotf
327#define __ieee754_j0f c_j0f
328#define __ieee754_j1f c_j1f
329#define __ieee754_y0f c_y0f
330#define __ieee754_y1f c_y1f
331#define __ieee754_jnf c_jnf
332#define __ieee754_ynf c_ynf
333#define __ieee754_remainderf c_remainderf
346#ifdef INLINE_KERNEL_SINDF
350#ifdef INLINE_KERNEL_COSDF
354#ifdef INLINE_KERNEL_TANDF
long double __kernel_tanl(long double, long double, int)
long double __kernel_sinl(long double, long double, int)
double __kernel_sin(double, double, int)
float __ldexp_expf(float, int)
int __ieee754_rem_pio2f(float, double *)
void __scan_nan(u_int32_t *__words, int __num_words, const char *__s)
double __ldexp_exp(double, int)
double __kernel_cos(double, double)
long double __kernel_cosl(long double, long double)
int __kernel_rem_pio2(double *, double *, int, int, int)
double __kernel_tan(double, double, int)
float __kernel_tandf(double, int)
float __kernel_sindf(double)
float __kernel_cosdf(double)
int __ieee754_rem_pio2(double, double *)