Changes in / [5cced80:49aaa0e] in mainline


Ignore:
Location:
uspace/lib/math
Files:
4 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/generic/internal.h

    r5cced80 r49aaa0e  
    3131#define MATH_INTERNAL_H_
    3232
    33 #include <stdint.h>
    34 
    35 #if __BE__
    36 
    37 typedef union
    38 {
    39         double value;
    40         struct
    41         {
    42                 uint32_t msw;
    43                 uint32_t lsw;
    44         } parts;
    45         uint64_t word;
    46 } ieee_double_shape_type;
    47 
    48 #endif
    49 
    50 #if __LE__
    51 
    52 typedef union
    53 {
    54         double value;
    55         struct
    56         {
    57                 uint32_t lsw;
    58                 uint32_t msw;
    59         } parts;
    60         uint64_t word;
    61 } ieee_double_shape_type;
    62 
    63 #endif
    64 
    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_WORD
    75 # 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 #endif
    82 
    83 /* Get the less significant 32 bit int from a double.  */
    84 #ifndef GET_LOW_WORD
    85 # 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 #endif
    92 
    93 /* Get all in one, efficient on 64-bit machines.  */
    94 #ifndef EXTRACT_WORDS64
    95 # 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 #endif
    102 
    103 /* Set a double from two 32 bit ints.  */
    104 #ifndef INSERT_WORDS
    105 # 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 #endif
    113 
    114 /* Get all in one, efficient on 64-bit machines.  */
    115 #ifndef INSERT_WORDS64
    116 # 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 #endif
    123 
    124 /* Set the more significant 32 bits of a double from an int.  */
    125 #ifndef SET_HIGH_WORD
    126 #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 #endif
    134 
    135 /* Set the less significant 32 bits of a double from an int.  */
    136 #ifndef SET_LOW_WORD
    137 # 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 #endif
    145 
    146 
    14733float __math_base_sin_32(float);
    14834float __math_base_cos_32(float);
  • uspace/lib/math/meson.build

    r5cced80 r49aaa0e  
    4444        'generic/sincos.c',
    4545        'generic/trunc.c',
    46         'generic/pow.c',
    47         'generic/scalbn.c',
    48         'generic/sqrt.c',
    49         'generic/log.c',
    5046)
    5147
Note: See TracChangeset for help on using the changeset viewer.