File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ static __inline int clzSrcT(usrc_t x) { return __clzti2(x); }
44
44
typedef float dst_t ;
45
45
typedef uint32_t dst_rep_t ;
46
46
#define DST_REP_C UINT32_C
47
- static const int dstSigBits = 23 ;
47
+
48
+ enum {
49
+ dstSigBits = 23 ,
50
+ };
48
51
49
52
#elif defined DST_DOUBLE
50
53
typedef double dst_t ;
Original file line number Diff line number Diff line change 17
17
static __inline dst_t __floatXiYf__ (src_t a) {
18
18
if (a == 0 )
19
19
return 0.0 ;
20
- const int dstMantDig = dstSigBits + 1 ;
21
- const int srcBits = sizeof (src_t ) * CHAR_BIT;
22
- const int srcIsSigned = ((src_t )-1 ) < 0 ;
20
+
21
+ enum {
22
+ dstMantDig = dstSigBits + 1 ,
23
+ srcBits = sizeof (src_t ) * CHAR_BIT,
24
+ srcIsSigned = ((src_t )-1 ) < 0 ,
25
+ };
26
+
23
27
const src_t s = srcIsSigned ? a >> (srcBits - 1 ) : 0 ;
28
+
24
29
a = (usrc_t )(a ^ s) - s;
25
30
int sd = srcBits - clzSrcT (a); // number of significant digits
26
31
int e = sd - 1 ; // exponent
You can’t perform that action at this time.
0 commit comments