Skip to main content

Questions tagged [bigint]

Use this for questions implementing integers larger than the platform's supported size, or relying heavily on such integers provided by a library.

5 votes
3 answers
765 views

Intro I have a simple methods that converts the input instances of java.math.BigInteger to checksum. The checksum algorithm sums up all the digits in the input <...
coderodde's user avatar
  • 32.3k
13 votes
5 answers
3k views

This is my infinite precision integer implemented in C++20. It supports negative numbers. I have implemented addition, subtraction, multiplication and binary integer division, which returns quotient ...
Ξένη Γήινος's user avatar
7 votes
1 answer
954 views

Cooked this up in 3 days because I was bored and thought this would be an interesting project to work on. This BigInt implementation does what you'd expect it to do,...
Famiu's user avatar
  • 378
1 vote
2 answers
144 views

This post is the continuation of A Java class for representing big integers with arbitrary number of digits and summation method. This time, I changed a manual character digit check to ...
coderodde's user avatar
  • 32.3k
7 votes
1 answer
210 views

(This post has a continuation A Java class for representing big integers with arbitrary number of digits and summation method - take II.) Intro Now I have this rather simplistic ...
coderodde's user avatar
  • 32.3k
4 votes
0 answers
132 views

I am developing a C++ big integer library for C++11, 14, 17, 20, etc., as an exercise. The Toom-3 algorithm is resisting me a little bit. AFAICT, it does produce the right results but not as fast as I ...
Atmo's user avatar
  • 211
2 votes
1 answer
114 views

I'm gradually writing an arbitrary-precision arithmetic library for C++. I've decided it could be useful to have the default constructor produce an object of indeterminate value, rather than relying ...
saxbophone's user avatar
2 votes
1 answer
105 views

My second little project. I would like to hear all the critics possible. This is a C++ Long Int library. It is self-education project, however I would like to make it better. For me possible things to ...
bowtoyourlord's user avatar
2 votes
1 answer
288 views

This post is a second part of my original post, Add two huge base-10 numbers, which deals with adding two huge base-10 numbers. However, in this case, I'm multiplying two non-negative whole numbers. ...
avighnac's user avatar
  • 331
5 votes
1 answer
198 views

This is some assembly code I've written to add two base-10 numbers. The input and output are represented as null-terminated ASCII strings, with digits in big-endian order. I have also provided ...
avighnac's user avatar
  • 331
1 vote
1 answer
108 views

I'm writing some small programs to practice Rust, and this one's a string compressor for the golfing language Jelly (unofficial spec). It involves some non-ASCII stuff and bigints (from the ...
rydwolf's user avatar
  • 151
3 votes
0 answers
341 views

I have this code to go from an array of bytes (arbitrarily long) to a "bigint" string (really, an arbitrarily long string composed of integers 0-9), and go from that long integer string into ...
Lance Pollard's user avatar
1 vote
1 answer
188 views

This question is a follow up of Header only bigint library written in c++20. I've made all (or almost all) the corrections suggested in the answers, plus some minor change here and there and a ...
ThePirate42's user avatar
6 votes
2 answers
994 views

I made this over the course of a week and a half, to use it for some Project Euler problems. My goal was to make something relatively efficient that could be used as easily as a builtin type. I also ...
ThePirate42's user avatar
1 vote
1 answer
1k views

This is the follow up question of How can we optimizing Java BigInteger operations? Problem Reduce the number to 1 in a minimal number of steps, following the rules: ...
Anit Shrestha's user avatar

15 30 50 per page