(Almost) all the arithmetic operators in Poplog can be applied to all the different kinds of numbers and will produce appropriate kinds of results. So for example if you add or multiply integers together you'll get integers until the result is too large to fit into the maximum space allowed for integers, and in that case the result will be a biginteger. Where the transition occurs will depend on the word size of your machine. The relevant information can be obtained by loading the INT_PARAMETERS library:
lib int_parametersThis makes available two variables: pop_max_int, which is the largest (i.e. most positive) integer value and pop_min_int, which is the smallest (i.e. most negative) integer value. On a typical 32 bit machine these give:
pop_max_int, pop_min_int => ** 536870911 -536870912So any integer operation producing a number bigger than the first or smaller (more negative) than the second will produce a biginteger, not an integer.
isinteger(pop_min_int) => ** <true> isinteger(pop_min_int - 1) => ** <false> isbiginteger(pop_min_int - 1) => ** <true>