Catégorie : Maths
-
Using PARI/GP in C++
I wanted to use PARI/GP in a C++ code and be able to compile the project with CMake. Installing the library On some distributions, there is a package for the PARI library. Ubuntu & co: libpari-dev Fedora: pari-devel If this does not work, you can install the library manually: Download the latest version of the…
-
Polynomial long division in C++
I needed a function to perform polynomial division in C++. The polynomials are stored in vector< int >: a polynomial is represented by the vector Input of the function: vector< int >& iNumerator : the dividend (paramater by reference!) const vector< int >& iDenominator : the divisor Output: If iNumerator is divisible by iDenominator, the…