File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ LIBC_INLINE ExpRangeReduction exp2_range_reduction(float16 x) {
108
108
float xf = x;
109
109
float kf = fputil::nearest_integer (xf * 0x1 .0p+3f );
110
110
int x_hi_mid = static_cast <int >(kf);
111
- int x_hi = x_hi_mid >> 3 ;
112
- int x_mid = x_hi_mid & 0x7 ;
111
+ unsigned x_hi = static_cast < unsigned >( x_hi_mid) >> 3 ;
112
+ unsigned x_mid = static_cast < unsigned >( x_hi_mid) & 0x7 ;
113
113
// lo = x - (hi + mid) = round(x * 2^3) * (-2^(-3)) + x
114
114
float lo = fputil::multiply_add (kf, -0x1 .0p-3f , xf);
115
115
@@ -155,8 +155,8 @@ LIBC_INLINE ExpRangeReduction exp10_range_reduction(float16 x) {
155
155
float xf = x;
156
156
float kf = fputil::nearest_integer (xf * (LOG2F_10 * 0x1 .0p+3f ));
157
157
int x_hi_mid = static_cast <int >(kf);
158
- int x_hi = x_hi_mid >> 3 ;
159
- int x_mid = x_hi_mid & 0x7 ;
158
+ unsigned x_hi = static_cast < unsigned >( x_hi_mid) >> 3 ;
159
+ unsigned x_mid = static_cast < unsigned >( x_hi_mid) & 0x7 ;
160
160
// lo = x - (hi + mid) = round(x * 2^3 * log2(10)) * log10(2) * (-2^(-3)) + x
161
161
float lo = fputil::multiply_add (kf, LOG10F_2 * -0x1 .0p-3f , xf);
162
162
You can’t perform that action at this time.
0 commit comments