Questions tagged [gmp]

For code using the GNU Multiple Precision Arithmetic Library

Filter by
Sorted by
Tagged with
1 vote
0 answers
49 views

Point addition on secp256k1. Exploring other alternatives for practical purposes

...
Knm's user avatar
  • 11
3 votes
0 answers
41 views

R language optimize converting mpfr to gmp

I wrote a function to convert, without loss of precision, a mpfr - class value to a gmp bigq value. (This particular operation ...
Carl Witthoft's user avatar
6 votes
2 answers
140 views

Iter 2: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type

This is the 2nd iteration of a code review. The 1st iteration (completed) is at Iter 1: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type 1. Goal My intention is to ...
Daniel S.'s user avatar
  • 214
5 votes
1 answer
173 views

Iter 1: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type

This Q&A was iteration 1. Now there is Iter 2: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type 1. Goal My intention is to provide a fast hashing algorithm to hash ...
Daniel S.'s user avatar
  • 214
3 votes
0 answers
69 views

Fibonacci and Lucas sequence generator using Boost and GMP

I implemented this console application that generates Fibonacci and Lucas sequence numbers using boost and GMP for multiprecision. There is an iterator-like class which can do any sequence based on ...
slepic's user avatar
  • 5,327
9 votes
2 answers
706 views

RSA c implementation

This is my first attempt to implement a crypto algorithm. I am using C and gmp to interact with big numbers. I am basing my implementation of the RSA algorithm from the book "A handbook of ...
Thelouras's user avatar
  • 193
3 votes
0 answers
1k 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 ...
D. Senack's user avatar
6 votes
1 answer
182 views

Lucas Lehmer Primality Test

I have coded the Lucas-Lehmer primality test following Wikipedia's description. I used the mod 2^n - 1 suggested in the article but was wondering if there were any ...
Neil A.'s user avatar
  • 263
1 vote
0 answers
231 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): ...
Robert Hanigan's user avatar
3 votes
2 answers
1k views

Integer factoring in C using GMP for numbers

This code performs integer factoring using the GMP library, and can also use OpenMP for parallel computation. I compile it using: gcc -lgmp -fopenmp and whatever ...
user72935's user avatar
  • 175
5 votes
1 answer
1k views

Optimizing digit sum and product with GMP

I have a bottleneck in my program at the point where I calculate the digit sum and product of a number. I am using GMP because I have to work with numbers that follow \$1e8 < n < 1e80\$. To ...
Floris Velleman's user avatar