[ library(ic) | Reference Manual | Alphabetic Index ]

get_max(?Var, -Hi)

Retrieve the current upper bound of Var.
Var
A variable or a number
Hi
Upper bound

Description

Primitive for retrieving the upper bound of Var. Hi returns the maximum of the variable's interval. If the variable is integer and the bound is finite, then the bound will be returned as an integer; in all other cases it will be returned as a float. If Var has not been declared before, it will be turned into an unrestricted real variable. If Var is a ground number, Hi will give an appropriate bound based on the type and value of Var: an exact bound for floats, bounded reals and integers, and a best safe approximation for rationals.

Modes and Determinism

See Also

get_bounds / 3, get_float_bounds / 3, get_integer_bounds / 3, get_finite_integer_bounds / 3