Unverified Commit 1d4ea6ac authored by वेदांत's avatar वेदांत Committed by GitHub
Browse files

simplified non_sign_bits (#1649)

parent 198d08fc
...@@ -367,7 +367,7 @@ def create_dynamic_map(signed=True, max_exponent_bits=7, total_bits=8): ...@@ -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 # these are additional items that come from the case
# where all the exponent bits are zero and no # where all the exponent bits are zero and no
# indicator bit is present # 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 additional_items = 2 ** (non_sign_bits - max_exponent_bits) - 1
for i in range(max_exponent_bits): for i in range(max_exponent_bits):
fraction_items = int( fraction_items = int(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment