Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

wrappingInteger

🌌wrappingInteger

wrappingInteger

wrappingInteger is the abstract ancestor of integer numbers that have min and
max values and operations with wrap-around semantics.


redefines numeric.infix %!:

§infix *(other T)
 => 
T
:
Object

multiplication, with check for overflow
redefines numeric.infix *:
basic operations: 'infix *' (multiplication)


redefines numeric.infix *!:

§infix **(other T)
 => 
T
:
Object

exponentiation for positive exponent

'zero ** zero' is permitted and results in 'one'.

redefines numeric.infix **:
basic operations: 'infix **' (exponentiation)


redefines numeric.infix **!:

exponentiation with overflow checking semantics

'zero **? zero' is permitted and results in 'one'.

redefines numeric.infix **?:

§infix **^(other T)
 => 
T
:
Object

exponentiation with saturating semantics

'zero **^ zero' is permitted and results in 'one'.

redefines numeric.infix **^:

§infix **°(other T)
 => 
T
:
Object

exponentiation with wrap-around semantics

'zero **° zero' is permitted and results in 'one'.


redefines numeric.infix *?:

§infix *^(other T)
 => 
T
:
Object


redefines numeric.infix *^:

§infix *°(other T)
 => 
T
:
Object

§infix +(other T)
 => 
T
:
Object

addition, with check for overflow
redefines numeric.infix +:
basic operations: 'infix +' (addition)


redefines numeric.infix +!:


redefines numeric.infix +?:

§infix +^(other T)
 => 
T
:
Object


redefines numeric.infix +^:

§infix +°(other T)
 => 
T
:
Object

§infix -(other T)
 => 
T
:
Object

substraction, with check for overflow
redefines numeric.infix -:
basic operations: 'infix -' (substraction)


redefines numeric.infix -!:


redefines numeric.infix -?:

§infix -^(other T)
 => 
T
:
Object


redefines numeric.infix -^:

§infix -°(other T)
 => 
T
:
Object


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

saturating operations
redefines numeric.prefix -^:
saturating operations

neg, add, sub, mul with wrap-around semantics

would negation -thiz cause an overflow?