Examples¶
Example programs¶
FLINT comes with example programs to demonstrate current and future FLINT features. To build the example programs run:
make examples
The example programs are built in the build/examples directory.
For Arb and Calcium there are separate example pages Arb example programs and Calcium example programs. Below are some general examples.
partitionsDemonstrates the partition counting code, e.g.build/examples/partitions 1000000000will compute the number of partitions of10^9.delta_qexpComputes the \(n\)-th term of the delta function, e.g.build/examples/delta_qexp 1000000will compute the one million-th term of the \(q\)-expansion of delta.crtDemonstrates the integer Chinese Remainder code, e.g.build/examples/crt 10382788will build up the given integer from its value mod various primes.multi_crtDemonstrates the fast tree version of the integer Chinese Remainder code, e.g.build/examples/multi_crt 100493287498239 13will build up the given integer from its value mod the given number of primes.stirling_matrixGenerates Stirling number matrices of the first and second kind and computes their product, which should come out as the identity matrix. The matrices are printed to standard output. For examplebuild/examples/stirling_matrix 10does this with 10 by 10 matrices.fmpz_poly_factor_zassenhausDemonstrates the factorisation of a small polynomial. A larger polynomial is also provided on disk and a small (obvious) change to the example program will read this file instead of using the hard coded polynomial.padicGives examples of the usage of many functions in the padic module.fmpz_poly_qGives a very simple example of thefmpz_poly_qmodule.fmpq_polyGives a very simple example of thefmpq_polymodule.