Internally gp2c assign types to objects. The most common types are given below:
| name | description |
| void | like in C |
|---|---|
| bool | boolean, true (1) or false (0) |
| negbool | antiboolean, true (0) or false (1) |
| small | C integer long |
| int | multiprecision integer |
| real | multiprecision floating point |
| mp | multiprecision number |
| var | variable |
| pol | polynomial |
| vecsmall | vector of C long (t_VECSMALL) |
| vec | vector and matrices (excluding vecsmall) |
| list | GP lists |
| str | characters string as a char * |
| genstr | characters string as a GEN (t_STR) |
| gen | generic PARI object (GEN) |
| lg | length of object (returned by length) |
| typ | type of object (returned by type) |
Types are preordered as in Table 1. The complete preorder known by gp2c can be accessed by running 'gp2c -t'.
Variable are typed. A variable can only take values having a type equal or lower than its type. By default, variables are of type gen.