Skip to content

Commit 3ca3c80

Browse files
committed
simplified non_sign_bits
1 parent d475533 commit 3ca3c80

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)