nat
🌌nat
natural number of arbitrary size, including zero
represented by its bit sequence
redefines integer.asString:
convert this to a decimal number in a string. If negative, add "-" as
the first character.
redefines Object.asString:
divide with remainder the two given positive ints
returns the quotient and the remainder
NYI performance: https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/math/big/natdiv.go
return two sequences of equal length
by prepending false to the shorter sequence
modulo
returns the remainder of the division
redefines integer.infix %:
division remainder
redefines numeric.infix %:
basic operations: 'infix %' (division remainder)
NYI make faster: https://en.wikipedia.org/wiki/Multiplication_algorithm#Computational_complexity_of_multiplication
multiply these natural numbers
redefines numeric.infix *:
basic operations: 'infix *' (multiplication)
add two natural numbers
redefines numeric.infix +:
basic operations: 'infix +' (addition)
subtract other from this natural number
redefines numeric.infix -:
basic operations: 'infix -' (substraction)
divide these natural numbers
redefines numeric.infix /:
basic operations: 'infix /' (division)
less or equal
redefines partiallyOrdered.infix <=:
does this come before other?
are these natural numbers equal?
redefines numeric.infix ==:
comparison
redefines partiallyOrdered.orderedThis:
get value of type P.
NYI: Once Eiffel-style 'like this' works, we can use 'like this' instead of
T and no longer need this feature.
redefines numeric.thiz:
get numeric.this value of type T. This is used for a generic implemention
of some features (e.g. prefix -, abs