| abstract class $CPX_NUMBER{ETP<$REAL_NUMBER{ETP},NTP} < $NFE{NTP} |
|---|
| **** | Complex numbers are strictly more general than real numbers. The right abstraction would be to force real numbers to povide a "zero" real part, but this is quite awkward. It is simpler to enforce no relationship, which conforms to the way we seem to actually deal with complex and real numbers |
| $NFE{_} | $IS_EQ | $STR | $NIL | $IS_NIL |
| CPX | CPXD | CPX{_} |
| conjugate: SAME; |
|---|
| create(re,im: ETP): SAME; |
|---|
| **** | Create a complex number with a real "re" and imaginary "im" part |
| create_real(repart: ETP): SAME; |
|---|
| **** | Create a complex number with real part = "re" and imaginary part equal to zero |
| im: ETP; |
|---|
| **** | Imaginary part |
| re: ETP; |
|---|
| **** | Real part |