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.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13
votes
0answers
160 views

Signed integer-to-ascii x86_64 assembler macro

I have implemented an algorithm which converts a signed integer to its ASCII equivalent string with the corresponding sign as a first byte. I have tested it on several numbers and it worked correctly. ...
6
votes
0answers
124 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
514 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. ...
4
votes
0answers
40 views

Binary Trie in F#

I have this little exercise writing a binary trie in F#. In C# it can be done in few lines, but here it became more complicated than I had expected (especially the ...
4
votes
0answers
60 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
525 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
485 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
61 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
134 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
202 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
56 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'...