Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signed multiprecision used bits #69

Merged
merged 3 commits into from
Nov 6, 2017

Conversation

johnmcfarlane
Copy link
Owner

Fix for #67

johnmcfarlane and others added 3 commits November 5, 2017 18:13
…ypes

- addresses [issue#67](#67)
- pass by `const&` to avoid costly copies of (potentially) large objects
- do not rely on `sizeof(I)*CHAR_BIT` to measure bit width
  - use `cnl::digits` instead
- number of bits (width) was being reported for the number of digits for
  a signed boost::multiprecision::cpp_int_backend type
- sign bit was being added twice to the width of signed, multiprecision
  ints that use the cnl::multiprecision alias
- tests in index.cpp now reflect this are are generally tidied up
  - cleaner `using` directives
  - makes use of cnl::multiprecision
  - all the digit counts now add up
@johnmcfarlane johnmcfarlane merged commit 21b52c3 into develop Nov 6, 2017
@johnmcfarlane johnmcfarlane deleted the signed_multiprecision_used_bits branch November 6, 2017 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant