From 3ca3c80081d4bb11caf8eb3b3fe727d6bcabe407 Mon Sep 17 00:00:00 2001 From: V-E-D Date: Sat, 24 May 2025 10:08:19 +0530 Subject: [PATCH] simplified non_sign_bits --- bitsandbytes/functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitsandbytes/functional.py b/bitsandbytes/functional.py index b0092ffd1..14c37aa53 100644 --- a/bitsandbytes/functional.py +++ b/bitsandbytes/functional.py @@ -367,7 +367,7 @@ def create_dynamic_map(signed=True, max_exponent_bits=7, total_bits=8): # these are additional items that come from the case # where all the exponent bits are zero and no # indicator bit is present - non_sign_bits = total_bits - (1 if signed else 1) + non_sign_bits = total_bits - 1 additional_items = 2 ** (non_sign_bits - max_exponent_bits) - 1 for i in range(max_exponent_bits): fraction_items = int(