XSB has some predefined values (MAXINT), but other Prologs don't
define anything. I assume that you are using SWI, so I looked in the
SWI manual, but I couldn't find anything like that. I know from my own
experience that when I was writing the datime library, I wanted to
transform any date into a numeric value and I couldn't because the
number of seconds was bigger than what SWI could represent.
My advice is to define your own value for the maximum numbers that you allow.
my_maxnumber(1000000).
and then use it where you need in the code:
...X...,
my_maxnumber(MAX),
(MAX > X
-> ( do your stuff )
; ( write('Errror: '), write(X), write(' is too big.'), nl )
),
...
Paul.