Questions tagged [mpir]

MPIR (Multiple Precision Integers and Rationals) is an open source multiprecision integer (bignum) library forked from the GMP (GNU Multi Precision) project. It consists of much code from past GMP releases, in combination with much original contributed code. The basic interface is for C, but it also provides a C++ wrapper.

MPIR (Multiple Precision Integers and Rationals) is an open source multi-precision integer (bignum) library forked from the GMP (GNU Multi Precision) project. It consists of much code from past GMP releases, in combination with much original contributed code.

The basic interface is for C, but it also provides a C++ wrapper. The authors have, so far, preserved backwards compatibility with the GMP library.

38 questions
1
vote
1 answer

Writing number with a lot of digits into file using MPIR

I'm using MPIR/Ubuntu 14.04. I have big integer that have a lot of digits, like 2^1920, and don't know how to write it into file *.txt FILE *result; result=fopen("Number.txt","a+"); gmp_fprintf(result,"%d",xyz); fclose(result); didn't work. Are…
Sergey
  • 15
  • 2
1
vote
1 answer

C++ MPIR/MPFR interoperability

I'm working on a project that deals with very large integers, and have used the MPIR library, based on GMPlib for the whole project so far. I now require a logarithm function, which MPIR does not contain. Another library, MPFR, also based on GMPlib,…
Transmission
  • 1,219
  • 1
  • 10
  • 11
0
votes
1 answer

gmp/mpir/mpfr: unresolved external symbol __gmp_bits_per_limb

I built in VS2019 the MPIR and MPFR libs from the provided .sln in the source. Basic samples are built and run fine. However, the following: cout << __gmp_bits_per_limb << endl; cout << gmp_version << endl; reports missing link symbols. The first…
Zohar Levi
  • 614
  • 6
  • 16
0
votes
1 answer

Memory corruption error on Windows build of MPIR

I'm running into a memory corruption error with the Windows version of MPIR, which shows up in the following minimal test case. Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28610.4 for x64 Compiled MPIR from the github checkout (have…
rwallace
  • 31,405
  • 40
  • 123
  • 242
0
votes
1 answer

Can't find module "mpir" while unsing CMake generating "gr-ais"

I'm trying to install "gr-ais" and I get an error while using CMake "Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_INCLUDE_DIR)": mavo@mavo:~/Dokumente/ais$ cmake gr-ais/ -- Build type not specified: defaulting to release. -- Checking for module…
Mavo
  • 1
  • 2
0
votes
1 answer

Why do I get a configure error when installing MPIR?

I'm having a hard time because I've trying since three days to install the FLINT2 (Fast Library In Number Theory) library for c++ and use it in Visual Studio 2019. I discovered upon the reading of the documentation that I needed first to install…
0
votes
1 answer

How to use gmp-mpir-mpfr in eclipse correctly?

I've managed to to use mpfr-mpir-gmp in CodeBlocks but I want to in eclipse C++: When I compile the code it compiles and build but if I run the project it says: "error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No…
Itachi Uchiwa
  • 3,044
  • 12
  • 26
0
votes
0 answers

Why I get "mpir_ui" was not declared in this scope?

after installing mpir-3.0 on fedora 31. Now I try to build project: #include #include #include #include #include using namespace std; int main(int argc, char* argv[]) { mpf_t a; //mpir…
Itachi Uchiwa
  • 3,044
  • 12
  • 26
0
votes
1 answer

MPI_Scatter root processus exit with signal (6)

I am trying to read an image (.ras) and sending a part of the image to each process. But every time I get Primary job terminated normally, but 1 process returned a non-zero exit code. Per user-direction, the job has been aborted. mpirun noticed…
0
votes
1 answer

Having problems installing MPIR on Windows in Visual Studio?

For the past 3 days, I've been trying to get libraries built in VS2017 on Windows 7 and here is what I was able to come up with: If you are having issues getting MPIR working with Visual Studio 2017 on Windows 7 64bit. You can follow these steps.…
Francis Cugler
  • 7,788
  • 2
  • 28
  • 59
0
votes
0 answers

Incorrect simultaneous operation of OpenMP and MPIR in VS 2015

Guys. I'm trying to speed up the loop using OpenMP. If I speed up a loop that uses an integer variable, then everything works correctly: void main() { //mpz_class i("0"); //mpz_class k("1"); //mpz_class l("1211728594799"); int k =…
sdfpro
  • 1
  • 1
0
votes
0 answers

Using c ++ amp to speed up the program in which the MPIR library (GMP) is used. Is this possible?

I want to understand if I can speed up the execution of a loop that works with the MPIR library using the GPU processor and c ++ amp for this? Here is the code I would like to speed up: #include #include #include…
sdfpro
  • 1
  • 1
0
votes
1 answer

Building MPFR and MPIR for UWP Visual Studio 2017

Does anyone know if it is possible to build MPFR and MPIR libraries using Visual Studio 2017 15.3 to be used in UWP app? By the way, I can not build those libraries even not for UWP - too many errors :( I am trying to follow ReadMe and Install…
Julia B
  • 35
  • 5
0
votes
0 answers

How to get Visual Studio 2008 to Program Files? (64-bit)

So I'm following the instructions to install MPIR (bigger integers library), which i chose before GMP, because of more information being availible on Windows download and just easier installation for typical user. Basically I found this simple…
SamS
  • 3
  • 5
0
votes
1 answer

Saving mpf_t value to file using MPIR (GMP) library

I am trying to save my number in a file but the program keeps crashing: include stdio.h include mpir.h int main(void){ mpf_set_default_prec(32); //Default precision for floating points mpf_t my_number; mpf_init_set_str(my_number, "5.12345e0",…