wrappingInteger
🌌wrappingInteger
wrappingInteger
wrappingInteger is the abstract ancestor of integer numbers that have min and
max values and operations with wrap-around semantics.
multiplication, with check for overflow
redefines numeric.infix *:
basic operations: 'infix *' (multiplication)
exponentiation for positive exponent
'zero ** zero' is permitted and results in 'one'.
redefines numeric.infix **:
basic operations: 'infix **' (exponentiation)
exponentiation with overflow checking semantics
'zero **? zero' is permitted and results in 'one'.
redefines numeric.infix **?:
exponentiation with saturating semantics
'zero **^ zero' is permitted and results in 'one'.
redefines numeric.infix **^:
exponentiation with wrap-around semantics
'zero **° zero' is permitted and results in 'one'.
redefines numeric.infix *?:
addition, with check for overflow
redefines numeric.infix +:
basic operations: 'infix +' (addition)
redefines numeric.infix +?:
substraction, with check for overflow
redefines numeric.infix -:
basic operations: 'infix -' (substraction)
redefines numeric.infix -?:
would addtion thiz + other cause an overflow or underflow?
would exponentiation 'this ** other' cause an overflow?
would multiplication thiz * other cause an overflow or underflow?
would subtraction thiz - other cause an overflow or underflow?
negation, with check for overflow
redefines numeric.prefix -:
basic operations: 'prefix -' (negation)
preconditions used in 'numeric' for basic operations: true if the
operation is permitted for the given values
redefines numeric.prefix -!:
overflow checking operations
redefines numeric.prefix -?:
overflow checking operations
would negation -thiz cause an overflow?