[ Arithmetic | Reference Manual | Alphabetic Index ]
Extracts the upper floating point bound of Number
- A number.
- Output: float.
This predicate is used by the ECLiPSe compiler to expand evaluable
arithmetic expressions. So a call to breal_max(Number, Result) is
Result is breal_max(Number).
A bounded real is a real number represented by a lower and upper
bound in floating point format. This predicate extracts the upper
bound and unifies it with Result. If Number is not a bounded real,
the result returned is equivalent to converting it to a bounded real
Modes and Determinism
- (4) instantiation fault
- Number is not instantiated
- (24) number expected
- Number is a not a number.
Result is breal_max(0.99__1.01). % gives Result = 1.01
% with implicit type conversion to breal:
Result is breal_max(1.0). % gives Result = 1.0
Result is breal_max(1). % gives Result = 1.0
Result is breal_max(1_10). % gives Result = 0.10000000000000002
breal_min / 2, breal / 1, breal / 2, breal_bounds / 3, breal_from_bounds / 3, is / 2