Max_integer seems to be on holiday (MIA) from current_prolog_flag v9.0.4

current_prolog_flag(max_integer,D). isn’t available on my 9.0.4 systems but is on my 8.4.3.

max_integer remains documented on the website. I also checked the documented differences at
for max_integer, so I suspect that something inadvertent has occurred.

Also is this the correct place for logging discovered anomolies?

My reading of the documentation is that max_integer is only defined if using a version of SWI-Prolog built without multi-precision arithmetic.

Maximum integer value if integers are bounded. See also the flag bounded and section

ISO Prolog flag. If true, integer representation is bound by min_integer and max_integer. If false integers can be arbitrarily large and the min_integer and max_integer are not present. The flag max_integer_size may be used to enforce an arbitrary limit rather than exhausting memory. See section

Perhaps you want:

Maximum integer value represented as a ‘tagged’ value. Tagged integers require one word storage. Larger integers are represented as ‘indirect data’ and require significantly more space.

The highest integer that can be represented precisely as a floating point number.

1 Like

Might relate to your earlier remark to have been using the Mint package. Seems this is a bit broken. Normally SWI-Prolog should have GMP (GNU Multiple Precision) library as dependency, which gives it unbounded integers (and rational numbers and good random numbers). GMP is sometimes omitted for special applications that either can use the (little) extra performance or for which the LGPL license is a problem. Since some versions, SWI-Prolog provides an alternative multiple precision library based on LibBF that does not involve the LGPL. That is bundled and selected by default if GMP is not present. Only if you really insist you can specify (when building SWI-Prolog) you want neither and only have small bounded integers.