3.10 Demonstration programs

The demos subdirectory has some sample programs using GMP. These aren’t built or installed, but there’s a Makefile with rules for them. For instance,

make pexpr
./pexpr 68^975+10

The following programs are provided

As an aside, consideration has been given at various times to some sort of expression evaluation within the main GMP library. Going beyond something minimal quickly leads to matters like user-defined functions, looping, fixnums for control variables, etc, which are considered outside the scope of GMP (much closer to language interpreters or compilers, See Language Bindings). Something simple for program input convenience may yet be a possibility, a combination of the expr demo and the pexpr tree back-end perhaps. But for now the above evaluators are offered as illustrations.