Changes in / [c6863aed:0ae9e18] in mainline
- Location:
- uspace/lib/math
- Files:
-
- 4 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/generic/internal.h
rc6863aed r0ae9e18 31 31 #define MATH_INTERNAL_H_ 32 32 33 #include <stdint.h>34 35 #if __BE__36 37 typedef union38 {39 double value;40 struct41 {42 uint32_t msw;43 uint32_t lsw;44 } parts;45 uint64_t word;46 } ieee_double_shape_type;47 48 #endif49 50 #if __LE__51 52 typedef union53 {54 double value;55 struct56 {57 uint32_t lsw;58 uint32_t msw;59 } parts;60 uint64_t word;61 } ieee_double_shape_type;62 63 #endif64 65 #define EXTRACT_WORDS(ix0,ix1,d) \66 do { \67 ieee_double_shape_type ew_u; \68 ew_u.value = (d); \69 (ix0) = ew_u.parts.msw; \70 (ix1) = ew_u.parts.lsw; \71 } while (0)72 73 /* Get the more significant 32 bit int from a double. */74 #ifndef GET_HIGH_WORD75 # define GET_HIGH_WORD(i,d) \76 do { \77 ieee_double_shape_type gh_u; \78 gh_u.value = (d); \79 (i) = gh_u.parts.msw; \80 } while (0)81 #endif82 83 /* Get the less significant 32 bit int from a double. */84 #ifndef GET_LOW_WORD85 # define GET_LOW_WORD(i,d) \86 do { \87 ieee_double_shape_type gl_u; \88 gl_u.value = (d); \89 (i) = gl_u.parts.lsw; \90 } while (0)91 #endif92 93 /* Get all in one, efficient on 64-bit machines. */94 #ifndef EXTRACT_WORDS6495 # define EXTRACT_WORDS64(i,d) \96 do { \97 ieee_double_shape_type gh_u; \98 gh_u.value = (d); \99 (i) = gh_u.word; \100 } while (0)101 #endif102 103 /* Set a double from two 32 bit ints. */104 #ifndef INSERT_WORDS105 # define INSERT_WORDS(d,ix0,ix1) \106 do { \107 ieee_double_shape_type iw_u; \108 iw_u.parts.msw = (ix0); \109 iw_u.parts.lsw = (ix1); \110 (d) = iw_u.value; \111 } while (0)112 #endif113 114 /* Get all in one, efficient on 64-bit machines. */115 #ifndef INSERT_WORDS64116 # define INSERT_WORDS64(d,i) \117 do { \118 ieee_double_shape_type iw_u; \119 iw_u.word = (i); \120 (d) = iw_u.value; \121 } while (0)122 #endif123 124 /* Set the more significant 32 bits of a double from an int. */125 #ifndef SET_HIGH_WORD126 #define SET_HIGH_WORD(d,v) \127 do { \128 ieee_double_shape_type sh_u; \129 sh_u.value = (d); \130 sh_u.parts.msw = (v); \131 (d) = sh_u.value; \132 } while (0)133 #endif134 135 /* Set the less significant 32 bits of a double from an int. */136 #ifndef SET_LOW_WORD137 # define SET_LOW_WORD(d,v) \138 do { \139 ieee_double_shape_type sl_u; \140 sl_u.value = (d); \141 sl_u.parts.lsw = (v); \142 (d) = sl_u.value; \143 } while (0)144 #endif145 146 147 33 float __math_base_sin_32(float); 148 34 float __math_base_cos_32(float); -
uspace/lib/math/meson.build
rc6863aed r0ae9e18 44 44 'generic/sincos.c', 45 45 'generic/trunc.c', 46 'generic/pow.c',47 'generic/scalbn.c',48 'generic/sqrt.c',49 'generic/log.c',50 46 ) 51 47
Note:
See TracChangeset
for help on using the changeset viewer.