Questions tagged [integer]
Use this tag for questions about using, storing or manipulating integral values of all types and sizes, including concerns about overflow. Not for code that casually happens to use integers.
10
questions with no upvoted or accepted answers
7
votes
0answers
143 views
Find an arithmetic expression near to target value
I wrote this program as an answer to Express a Number challenge on the Programming Puzzles & Code Golf site; it may be worth looking there for the context. The concept is simple (and familiar to ...
6
votes
0answers
710 views
Recursive factorial calculations in Rust
I am trying to calculate very large factorials. I am looking to speed it up as 10000! takes approximately a minute and a half.
...
5
votes
2answers
93 views
Fastest (in clock cycles) 16-bit x 16-bit unsigned integer division algorithm for ATMEGA1284?
I am trying to create an optimized 16-bit division algorithm for the AVR ATMEGA1284. The goal is to reduce the number of clock cycles as much as possible.
AVR INSTRUCTION SET MANUAL:
https://ww1....
5
votes
0answers
81 views
C++ library with tools for (arithmetic) type manipulation and mixing
Broken out from a previous question (C++17 saturating integer (arithmetic) type library) is a small C++17 header-only library to deal with issues that arise working with arithmetic where signed, ...
3
votes
0answers
957 views
Miller-Rabin Primality Test Using C++ and GMP
I'm currently writing a Miller-Rabin primality test using C++ and the GNU MP Bignum Library (GMP). As I've only started learning C++ about a day ago, I'm sure this code is riddled with errors and ...
2
votes
0answers
556 views
Recursive implementation of integer partition without re-arrangement
Problem: Integer partition without re-arrangement
Input: An arrangement S of nonnegative numbers {s1, . . . , sn} and an integer ...
1
vote
0answers
64 views
Smallest difference of pair in String-array
Let's say I have the following array of Strings:
String[] rows = new String[]{
"",
"A",
"B C C",
"",
"B D E",
"E F G H"
};
As well as the following ...
1
vote
0answers
171 views
Wrapper for GMP in C++
I'm writing a C++ high precision library based on GMP, sample code(files which have to be added to project):
...
1
vote
0answers
213 views
Cookie Clicker esque game idea
I am making a cookie clicker type game as a small project, within Xcode, written in Swift. I have a been developing a function which will turn a Int64() into a 4 ...
1
vote
0answers
58 views
Numeric parser for integers, big integers, and doubles
I have written the following numeric parser. It may not be as fast as Boost's lexical_cast, nor as convenient, but it does get the job done and it does look good. I'...