complex
🌌complex
complex -- complex numbers based on arbitrary numeric type
complex provides complex numbers based on a numeric type (e.g. f64, i32).
A complex number consists of a real and an imaginary part.
just for brevity
redefines numeric.infix *:
basic operations: 'infix *' (multiplication)
redefines numeric.infix +:
basic operations: 'infix +' (addition)
redefines numeric.infix -:
basic operations: 'infix -' (substraction)
redefines numeric.infix /:
basic operations: 'infix /' (division)
NYI: total order ignoring imag
redefines ordered.infix <:
does this come strictly before other?
redefines partiallyOrdered.infix <=:
does this come before other?
redefines ordered.infix >:
does this come strictly after other?
redefines ordered.infix >=:
does this come after other?
redefines numerics.one:
identity element for 'infix *'
redefines partiallyOrdered.orderedThis:
get value of type T.
NYI: Once Eiffel-style 'like this' works, we can use 'like this' instead of
T and no longer need this feature.
basic operations
redefines numeric.prefix +:
basic operations: 'prefix +' (identity)
enable generic features in ancestors
redefines numeric.thiz:
get numeric.this value of type T. This is used for a generic implemention
of some features (e.g. prefix -, abs
NYI: these three should be implemented in complexes, not here:
redefines numerics.zero:
identity element for 'infix +'