[PYTHON MATRIX-SIG] printing complexes

P. Dubois dubois@kristen.llnl.gov
Fri, 3 Nov 1995 13:25:07 +0800


Actually, allow me to admit that the notation 3 + 4i in Basis *is*
arithmetic, so that indeed 2 + 3i * 1 - 7i is 2-4i. While I think I
know more about how to right a parser now, back in 1984 I didn't, so I
took this very lazy way of introducing complex numbers.

That said, it should be noted that the overwhelming percentage of all
our matrices and complex numbers are created by users accessing compiled
variables in common blocks that have been filled by compiled routines.
So actual occurrence of a complex literal AS INPUT is rare.
I think that would be true for most Python users too. You get complex
numbers by reading some data and doing an FFT or eigenproblem or calculating
some field, usually. So the question of how to represent complex literals
in Python input is probably not very important as long as you don't end up
screwing something up, like making the scanner twice as costly etc.



=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================