1 #ifndef _MATH_PRIVATE_H_
2 #error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
5 /* A union which permits us to convert between a long double and
6 four 32 bit ints or two 64 bit ints. */
8 #if __FLOAT_WORD_ORDER == BIG_ENDIAN
20 u_int32_t w0
, w1
, w2
, w3
;
22 } ieee854_long_double_shape_type
;
26 #if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
38 u_int32_t w3
, w2
, w1
, w0
;
40 } ieee854_long_double_shape_type
;
44 /* Get two 64 bit ints from a long double. */
46 #define GET_LDOUBLE_WORDS64(ix0,ix1,d) \
48 ieee854_long_double_shape_type qw_u; \
50 (ix0) = qw_u.parts64.msw; \
51 (ix1) = qw_u.parts64.lsw; \
54 /* Set a long double from two 64 bit ints. */
56 #define SET_LDOUBLE_WORDS64(d,ix0,ix1) \
58 ieee854_long_double_shape_type qw_u; \
59 qw_u.parts64.msw = (ix0); \
60 qw_u.parts64.lsw = (ix1); \
64 /* Get the more significant 64 bits of a long double mantissa. */
66 #define GET_LDOUBLE_MSW64(v,d) \
68 ieee854_long_double_shape_type sh_u; \
70 (v) = sh_u.parts64.msw; \
73 /* Set the more significant 64 bits of a long double mantissa from an int. */
75 #define SET_LDOUBLE_MSW64(d,v) \
77 ieee854_long_double_shape_type sh_u; \
79 sh_u.parts64.msw = (v); \
83 /* Get the least significant 64 bits of a long double mantissa. */
85 #define GET_LDOUBLE_LSW64(v,d) \
87 ieee854_long_double_shape_type sh_u; \
89 (v) = sh_u.parts64.lsw; \