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

U128 v2 #887

Open
wants to merge 178 commits into
base: develop
Choose a base branch
from
Open

U128 v2 #887

wants to merge 178 commits into from

Conversation

mborland
Copy link
Member

Closes: #885

@mborland
Copy link
Member Author

@ckormanyos since this PR is already a monster I think I'm going to merge it once it turns green, and then do the integration work into a separate PR. There is also some demand for a boost library containing just a u128 and i128. I think it would be pretty easy to copy-paste this into such a thing.

@ckormanyos
Copy link
Collaborator

This is, indeed, a lot of work and I need to catch up.

There is also some demand for a boost library containing just a u128 and i128. I think it would be pretty easy to copy-paste this into such a thing.

I believe so. We have considered this in some form or another in numerous offline chats. I guess (u)int128 would be something like a prerequisite for (not only this, but also other) library(ies).

In the old days, we did some work with float128 in both math and multiprecision without going the formal route for a full-on library. It might be an option to make (u)int128 in an optimized form be something within a larger context of an existing header-only library?

@mborland
Copy link
Member Author

This is, indeed, a lot of work and I need to catch up.

There is also some demand for a boost library containing just a u128 and i128. I think it would be pretty easy to copy-paste this into such a thing.

I believe so. We have considered this in some form or another in numerous offline chats. I guess (u)int128 would be something like a prerequisite for (not only this, but also other) library(ies).

In the old days, we did some work with float128 in both math and multiprecision without going the formal route for a full-on library. It might be an option to make (u)int128 in an optimized form be something within a larger context of an existing header-only library?

I had previously talked with Peter Dimov about adding uint128 and int128 to core, but since this PR and an equivalent int128 would take over 11,000 lines he thinks it's best separate. A few others have said the same since these additions would be an almost 50% increase in the size of core.

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.9%. Comparing base (8683e33) to head (8fdeb39).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop    #887     +/-   ##
=========================================
+ Coverage     98.9%   98.9%   +0.1%     
=========================================
  Files          235     236      +1     
  Lines        16955   16957      +2     
  Branches      1822    1822             
=========================================
+ Hits         16768   16770      +2     
  Misses         187     187             
Files with missing lines Coverage Δ
...lude/boost/decimal/detail/integer_search_trees.hpp 96.7% <ø> (ø)
include/boost/decimal/detail/io.hpp 100.0% <ø> (ø)
include/boost/decimal/detail/power_tables.hpp 100.0% <ø> (ø)
test/benchmark_uints.cpp 100.0% <100.0%> (ø)
test/test_zeta.cpp 100.0% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8683e33...8fdeb39. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mborland
Copy link
Member Author

@ckormanyos do you want me to wait till you have a chance to look at this before merging? It's not really stopping anything since I am now looking into SIMD for u256.

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.

Rework u128
2 participants