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

numeric

🌌numeric

numeric -- parent of all numeric features

is this part of given set

NYI: infix operators currently always use dynamic binding on the lhs and pass
the rhs as an argument. If we would support an 'rinfix ∈' that would use the
rhs for dynamic binding and the lhs as argument, we could define '∈' in Set T
and it would work for all set types.

find the highest power of b that is less or equal than thiz.

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

basic operations: 'infix %' (division remainder)

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

basic operations: 'infix *' (multiplication)

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

basic operations: 'infix **' (exponentiation)

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

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

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

basic operations: 'infix +' (addition)

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

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

basic operations: 'infix -' (substraction)

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

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

basic operations: 'infix /' (division)


redefines partiallyOrdered.infix =:
equality check for immutable values

redefines hasEquals.infix =:
equality check for immutable values

comparison

§  max(other T)
 => 
T
:
Object

maximum of numeric.this and other

§  min(other T)
 => 
T
:
Object

minimum of numeric.this and other

is this not part of given set

basic operations: 'prefix +' (identity)

preconditions for basic operations: true if the operation's result is
representable for the given values

This does not check if the operation is defined (i.e, it
returns true for '3/!0' or '0**!0'.

basic operations: 'prefix -' (negation)

overflow checking operations

saturating operations

get numeric.this value of type T. This is used for a generic implemention
of some features (e.g. prefix -, abs

the u32 value corresponding to this
note: potential fraction will be discarded