[ Arithmetic | Reference Manual | Alphabetic Index ]
Converts Number into a breal number and unifies it with Result.
- A number.
- Output: bounded real number.
This predicate is used by the ECLiPSe compiler to expand evaluable
arithmetic expressions. So the call to breal(Number, Result) is
Result is breal(Number)
which should be preferred.
Modes and Determinism
- (4) instantiation fault
- Number is not instantiated (non-coroutining mode only).
- (24) number expected
- Number is not of a numeric type.
% integers and floats are assumed to be accurate:
Result is breal(25). % gives Result = 25.0__25.0
Result is breal(1.5). % gives Result = 1.5__1.5
% rationals are conservatively rounded:
Result is breal(3_4). % gives Result = 0.74999999999999989__0.75000000000000011
Result is breal(1.0__1.01). % gives Result = 1.0__1.01
integer / 2, float / 2, rational / 2, is / 2, breal_min / 2, breal_max / 2, breal_bounds / 3, breal_from_bounds / 3, breal / 1