/*** We provide a couple of additional elementary operations. The ulp* operation is defined for integer, float and decimal. It returns a* result of the same type as its argument. The gcd operation is* currently only defined for integers. It returns a result that* is an integer.** ulp: integer -> integer isqrt: integer -> integer* ulp: float -> float sqrtrem: integer -> integer^2* ulp: decimal -> decimal iroot: integer^2 -> integer* gcd: integer^2 -> integer rootrem: integer^2 -> integer^2* lcm: integer^2 -> integer divmod : number^2 -> number^2** The ulp operation makes use of the ulp() function of the Java Math* library. The gcd operation implements a binary gcd algorithm for* 32-bit integers and otherwise delegates to the Java BigInteger* gcd operation implementation.** Examples:* ulp(0) --> 1 isqrt(7) --> 2* ulp(0.0) --> 4.9E-324 sqrtrem(7) --> (2,3)* ulp(0d0.00) --> 0d0.01 iroot(77,5) --> 2* gcd(36,24) --> 12 rootrem(77,5) --> (2, 45)* lcm(36,24) --> 72 divmod(12,-7) --> (-1,5)** The evaluable functions isqrt/1 and iroot/2 as well as the predicates* sqrtrem/3 and rootrem/4 use the fast Hacker method of finding an* integer root. The predicate divmod/4 returns both the quotient* and remainder of a division. This is faster than invoking the ISO* core standard eval-uable functions (//)/2 and (rem)/2 separately.** Warranty & Liability* To the extent permitted by applicable law and unless explicitly* otherwise agreed upon, XLOG Technologies GmbH makes no warranties* regarding the provided information. XLOG Technologies GmbH assumes* no liability that any problems might be solved with the information* provided by XLOG Technologies GmbH.** Rights & License* All industrial property rights regarding the information - copyright* and patent rights in particular - are the sole property of XLOG* Technologies GmbH. If the company was not the originator of some* excerpts, XLOG Technologies GmbH has at least obtained the right to* reproduce, change and translate the information.** Reproduction is restricted to the whole unaltered document. Reproduction* of the information is only allowed for non-commercial uses. Selling,* giving away or letting of the execution of the library is prohibited.* The library can be distributed as part of your applications and libraries* for execution provided this comment remains unchanged.** Restrictions* Only to be distributed with programs that add significant and primary* functionality to the library. Not to be distributed with additional* software intended to replace any components of the library.** Trademarks* Jekejeke is a registered trademark of XLOG Technologies GmbH.*/* ulp(X, Y):* The predicate succeeds in Y with the unit of least precision of* the number X.*/* gcd(X, Y, Z):* The predicate succeeds in Z with the greatest common divisor of the* integer X and the integer Y.*/* lcm(X, Y, Z):* The predicate succeeds in Z with the least common multiple of the* integer X and the integer Y.*/% Sqrt Root/*** isqrt(X, Y):* The predicate succeeds in Y with the integer square root of X.*/% isqrt(+Integer, -Integer)* sqrtrem(X, Y, Z):* The predicate succeeds in Y with integer square root of X* and in Z with the corresponding remainder.*/% sqrtrem(+Integer, -Integer, -Integer)% N-th Root/*** iroot(X, Y, Z):* The predicate succeeds in Z with the Y-th root of X.*/% iroot(+Integer, +Integer, -Integer)* rootrem(X, Y, Z, T):* The predicate succeeds in Z with the Y-th root of X* and in T with the corresponding remainder.*/% Helper% shiftup(+Integer, +Integer, -Integer)* divmod(X, Y, Z, T):* The predicate succeeds in Z with the division of X by Y,* and in T with the modulo of X by Y.*/