[ library(ic) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

get_bounds(?Var, -Lo, -Hi)

Retrieve the current bounds of Var.
Var
A variable or a number
Lo
Lower bound
Hi
Upper bound

Description

Primitive for retrieving the upper and lower bounds of Var. Lo and Hi return the minimum and maximum (respectively) of the variable's interval. If the variable is integer and a bound is finite, then that 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, Lo and Hi will give appropriate bounds based on the type and value of Var: exact bounds for floats, bounded reals and integers, and best safe approximations for rationals.

Modes and Determinism

See Also

get_min / 2, get_max / 2, get_float_bounds / 3, get_integer_bounds / 3, get_finite_integer_bounds / 3, get_delta / 2, get_median / 2