This Prolog text provides further built-ins for numbers, as seen
in many other Prolog systems. The module originally started
with the predicate random/1 which gives a uniform random 64-bit
floating point value. Native implementations of divmod/4 can use
an algorithm that yields div/2 and mod/2 at the same time. Not
available for all targets.
The evaluable functions msb/1, lsb/1 and popcount/1 are not
required by the ISO core standard. Implementing these functions by
means of the bitwise and number theoretic functions is not
feasible. Native implementations, with access to the integer
representation, perform better by an order of magnitude. Not
available for all targets.
The following math evaluable functions are provided:
The following math predicates are provided: