really silly nit: why 3+5j instead of 3+5i?

Radovan Garabik garabik at center.fmph.uniba.sk.spam
Sat May 13 03:51:54 EDT 2000


Jeff Petkau <jpet at eskimo.com> wrote:
 : Can anyone tell me why Python uses 'j' instead of 'i' for imaginary
 : numbers? I know this is really minor, but every bloody time I
 : use complex numbers I forget and type i's, and have to go back
 : and change them all to j's. My fingers just won't learn.

you can always use something like this:
i = 1j
a = 2+3*i

 : [History of imaginary number notation, according to Google: Euler
 : invented the things, and he used 'i'. Gauss made 'em famous, and

Wasn't Tatraglia(sp?) the first one to use square roots of negative numbers?
(though he did not consider them numbers, just a clever trick of computing
the roots of cubic equations)

 : he used 'i'. Everyone since then has used 'i' except for electrical
 : engineers, and they probably just changed it to cause trouble. So

they changed it because i conflicted with the letter used for current, I.
(oh.. wait a minute... it is uppercase)... 
ok, _alternate_ current is denoted with lowercase i, and unfortunately
complex numbers in electrical engineering are almost exclusively used 
to describe _alternate_ currents....

 : why does Python use 'j'?]

G. knows :-)

-- 
 -----------------------------------------------------------
| Radovan Garabik  http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__         garabik @ fmph . uniba . sk       |
 -----------------------------------------------------------



More information about the Python-list mailing list