Comments (2)
Hi @vende11s thank you for posting this interesting query.
Indeed, you are detecting wide unsigned integer underflow. I will be updating the test cases to exercise this issue (even though there is not a problem).
Before we move entirely away from this issue, however, I would mention that it is possible to create the signed
counterpart to, let's say, your 2048 bit unsigned
integer.
The code below does this. You need more template parameters for signed types (because of historical reasons in this library), but it can be done if the need ever arises.
using uint2048 = ::math::wide_integer::uint2048_t;
using uint4096 = ::math::wide_integer::uint4096_t;
using sint2048 = ::math::wide_integer::uintwide_t<uint2048::my_width2, typename uint2048::limb_type, void, true>;
from wide-integer.
Nevermind, function reaches negative values.
from wide-integer.
Related Issues (20)
- Remove C++11 in CI response Boost Math/Multiprecision deprecate C++11 in 2023 HOT 2
- Deprecate C++11 and bump minimum langage standard to C++14 HOT 1
- Small coverage deltas causing CI failure(s) HOT 2
- Try out codacy report and if it adds value then use it
- Strive for 100 percent (Line) coverage in CI/Tests HOT 1
- Get arm-none-eabi benchmarks on the metal (simulated in QEMU)
- equivalent to mp::import_bits, mp::export_bits? HOT 5
- Upgrade docs to use Markdown's own LaTeX interpreter
- Handle Ubuntu 18.04 Deprecation on GHA
- about import_bits/export_bits HOT 9
- Replace (soon to be deprectated) LGTM with GitHub's CodeQL
- Cannot use integers in template parameters due to private data members. HOT 6
- Support signed/unsigned floored division (like Python // operator or divmod) HOT 3
- Adapt for GCC 13 HOT 2
- Halt early in a n_by_n multiplication loop if numbers are small enough HOT 16
- valgrind investigations HOT 6
- Repair GCD reduction which is broken for certain small values
- Refactoring has lead to slight performance drop and needs repair HOT 2
- Add cygwin run in CI HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wide-integer.