We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7abca75 commit bada922Copy full SHA for bada922
libc/src/__support/fixed_point/fx_bits.h
@@ -187,12 +187,11 @@ countls(T f) {
187
constexpr int CONTAIN_LEN = cpp::numeric_limits<BitType>::digits;
188
constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
189
190
- if constexpr (FXRep::SIGN_LEN != 0) {
191
- if (x < 0)
192
- x = bit_not(x);
193
- }
+ if constexpr (FXRep::SIGN_LEN != 0)
+ if (f < 0)
+ f = bit_not(f);
194
195
- BitType value_bits = FXBits(x)::get_bits();
+ BitType value_bits = FXBits(f)::get_bits();
196
return cpp::countl_zero(value_bits) - PADDING_LEN;
197
}
198
0 commit comments