Next Previous Up Top Contents Index

6.3 The MACHINE-WORDS module

6.3.6 Unsigned double word operations

For all of the following functions, all arguments that are specified as being specialized to <machine-word> accept an instance of <abstract-integer>, which is then coerced to a <machine-word> before performing the operation.

ud%divide

Function

ud%divide (dividend-low :: machine-word, dividend-high :: machine-word, divisor :: machine-word) => (quotient :: machine-word, remainder :: machine-word)

Performs unsigned division of the double word dividend by the divisor, returning a quotient and remainder such that
(quotient * divisor + remainder = dividend)

An error is signaled if the value of the divisor is zero or if the correct value for the quotient exceeds the machine word range.
ud%shift-left

Function

ud%shift-left (low :: machine-word, high :: machine-word, count :: integer) => (low :: machine-word, high :: machine-word)

Logical left shift by count of the double word value represented by low and high. An error is signaled unless 0 <= count < $machine-word-size.
ud%shift-right

Function

ud%shift-right (low :: machine-word, high :: machine-word, count :: integer) => (low :: machine-word, high :: machine-word)

Logical right shift by count of the double word value represented by low and high. An error is signaled unless 0 <= count < $machine-word-size.


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index