Skip to content

Commit 9b499bc

Browse files
committed
fix: use FXRep:TOTAL_LEN to incoporate for SIGN_LEN
1 parent c31e539 commit 9b499bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/__support/fixed_point/fx_bits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ countls(T f) {
185185
using FXBits = FXBits<T>;
186186

187187
constexpr int CONTAIN_LEN = cpp::numeric_limits<BitType>::digits;
188-
constexpr int PADDING_LEN = CONTAIN_LEN - (FXRep::INTEGRAL_LEN + FXRep::FRACTION_LEN);
188+
constexpr int PADDING_LEN = CONTAIN_LEN - FXRep::TOTAL_LEN;
189189

190190
if constexpr (FXRep::SIGN_LEN != 0) {
191191
if (x < 0)

0 commit comments

Comments
 (0)