Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
1d4ea6ac
Unverified
Commit
1d4ea6ac
authored
May 25, 2025
by
वेदांत
Committed by
GitHub
May 24, 2025
Browse files
simplified non_sign_bits (#1649)
parent
198d08fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bitsandbytes/functional.py
bitsandbytes/functional.py
+1
-1
No files found.
bitsandbytes/functional.py
View file @
1d4ea6ac
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment