
denominator(+Number, -Result)

   Extracts the denominator of the rational Number and unifies the resulting
integer with Result.



Arguments
   Number              An integer or rational number.
   Result              Output: integer.

Type
   Arithmetic

Description
   This predicate is used by the ECLiPSe compiler to expand evaluable
   arithmetic expressions.  So the call to denominator(Number, Result) is
   equivalent to

    Result is denominator(Number)

    which should be preferred.

   In coroutining mode, if Number is uninstantiated, the call to
   denominator/2 is delayed until this variable is instantiated.




Modes and Determinism
   denominator(+, -) is det

Exceptions
     4 --- Number is not instantiated (non-coroutining mode only).
     5 --- Number is a float or breal.
    24 --- Number is not of a numeric type.

Examples
   
Success:
    Result is denominator(3_4).		% gives Result = 4
    Result is denominator(9_12).	% gives Result = 4
    Result is denominator(-3_4).	% gives Result = 4
    Result is denominator(25).		% gives Result = 1

Error:
    Result is denominator(2.5).		% type error


See Also
   is / 2, numerator / 2, rational / 2
