Skip to content

Commit 1d4ea6a

Browse files
authored
simplified non_sign_bits (#1649)
1 parent 198d08f commit 1d4ea6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def create_dynamic_map(signed=True, max_exponent_bits=7, total_bits=8):
367367
# these are additional items that come from the case
368368
# where all the exponent bits are zero and no
369369
# indicator bit is present
370-
non_sign_bits = total_bits - (1 if signed else 1)
370+
non_sign_bits = total_bits - 1
371371
additional_items = 2 ** (non_sign_bits - max_exponent_bits) - 1
372372
for i in range(max_exponent_bits):
373373
fraction_items = int(

0 commit comments

Comments
 (0)