|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
To use NEWPOLKA in C, add
#include "pk.h" #include "pkeq.h" /* if you want linear equalities */
You should also link your object files with the NEWPOLKA library to produce an executable, by adding something like `-L$(APRON_PREFIX)/lib -lpolkag' in the command line in your Makefile (followed by the standard `-lapron -litvmpq -litvdbl -L$(MPFR_PREFIX)/lib -lmpfr -L$(GMP_PREFIX)/lib -lgmp').
There are actually several variants of the library:
long int. This may easily cause overflows, especially with many dimensions or variables. Overflows are not detected but usually result in infinite looping. The underlying representation for integers is
long long int. This may (less) easily cause overflows.
mpz_t, the multi-precision integers from the GNU GMP library. Overflows are not possible any more, but huge numbers may appear.
All scalars of type
double are converted to scalars of type
mpq_t inside NewPolka, as NewPolka works internally with exact
rational arithmetics. So when possible it is better for the user (in
term of efficiency) to convert already
double scalars to
There is a way to prevent overflow and/or huge numbers, which is to
position the options
Allocating NewPolka managers and setting specific options.
Also, all library are available in debug mode (`libpolkai_debug.a', ....