-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): simplify closest_representable and pbs_modulus_switch
- both code were selecting the bit below the last representable bit, extracted it and then added it to the bit above, the same effect can be achieved by adding a 1 at the bit below the last representable bit - update closest_representable to use an approach more like pbs_modulus_switch yielding assembly with 42% less instructions (12 -> 7)
- Loading branch information
1 parent
9297a88
commit 0f88726
Showing
2 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters