Next Previous Up Top Contents Index

6.3 The MACHINE-WORDS module

6.3.3 Overflow signalling 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.

so%+

Function

so%+ (m1 :: machine-word, m2 :: machine-word) => (sum :: machine-word)

Signed addition. An error is signaled on overflow.
so%-

Function

so%- (m1 :: machine-word, m2 :: machine-word) => (difference :: machine-word)

Signed subtraction. An error is signaled on overflow.
so%*

Function

so%* (m1 :: machine-word, m2 :: machine-word) => (product :: machine-word)

Signed multiplication. An error is signaled on overflow.
so%negative

Function

so%negative (m :: machine-word) => (r :: machine-word)

Negation. An error is signaled on overflow.
so%abs

Function

so%abs (m :: machine-word) => (r :: machine-word)

Absolute value. An error is signaled on overflow.
so%shift-left

Function

so%shift-left (m :: machine-word, count :: integer) => (r :: machine-word)

Arithmetic left shift of m by count. An error is signaled unless 0 <= count < $machine-word-size. An error is signaled on overflow.

Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index