# Max\_integer seems to be on holiday (MIA) from current\_prolog\_flag v9.0.4

**URL:** <https://swi-prolog.discourse.group/t/max-integer-seems-to-be-on-holiday-mia-from-current-prolog-flag-v9-0-4/7476>\
**Category:** General\
**Tags:** bug\
**Created:** [May 27, 2024, 6:19am UTC](https://swi-prolog.discourse.group/t/max-integer-seems-to-be-on-holiday-mia-from-current-prolog-flag-v9-0-4/7476 "2024-05-27T06:19:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DewayneG](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@DewayneG](https://swi-prolog.discourse.group/u/DewayneG)\
**Post date:** [May 27, 2024, 6:19am UTC](https://swi-prolog.discourse.group/t/max-integer-seems-to-be-on-holiday-mia-from-current-prolog-flag-v9-0-4/7476/1 "2024-05-27T06:19:42Z")

</div>

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  
[https://www.swi-prolog.org/ChangeLog?branch=stable&from=8.4.3&to=9.2.5](https://www.swi-prolog.org/ChangeLog?branch=stable&from=8.4.3&to=9.2.5)  
for max\_integer, so I suspect that something inadvertent has occurred.

Also is this the correct place for logging discovered anomolies?

---

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [May 27, 2024, 6:43am UTC](https://swi-prolog.discourse.group/t/max-integer-seems-to-be-on-holiday-mia-from-current-prolog-flag-v9-0-4/7476/2 "2024-05-27T06:43:23Z")

</div>

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

> **max\_integer** (integer)  
> Maximum integer value if integers are _bounded_. See also the flag [bounded](https://www.swi-prolog.org/pldoc/man?section=flags#flag:bounded) and [section 4.27.2.1](https://www.swi-prolog.org/pldoc/man?section=artypes).

> **bounded** (bool)  
> ISO Prolog flag. If `true`, integer representation is bound by [min\_integer](https://www.swi-prolog.org/pldoc/man?section=flags#flag:min_integer) and [max\_integer](https://www.swi-prolog.org/pldoc/man?section=flags#flag:max_integer). If `false` integers can be arbitrarily large and the [min\_integer](https://www.swi-prolog.org/pldoc/man?section=flags#flag:min_integer) and [max\_integer](https://www.swi-prolog.org/pldoc/man?section=flags#flag:max_integer) are not present. The flag [max\_integer\_size](https://www.swi-prolog.org/pldoc/man?section=flags#flag:max_integer_size) may be used to enforce an arbitrary limit rather than exhausting memory. See [section 4.27.2.1](https://www.swi-prolog.org/pldoc/man?section=artypes).

Perhaps you want:

> **max\_tagged\_integer** (integer)  
> 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.

> **float\_max\_integer** (float)  
> The highest integer that can be represented precisely as a floating point number.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [May 27, 2024, 7:11am UTC](https://swi-prolog.discourse.group/t/max-integer-seems-to-be-on-holiday-mia-from-current-prolog-flag-v9-0-4/7476/3 "2024-05-27T07:11:11Z")

</div>

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.
