Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I know that cooler heads will prevail, and that python won't get this silly syntax change, but...

...everyone seems to be forgetting that i == -j (either squared is 1). Physicists usually describe traveling waves (of whatever) as something proportional to exp(kx-iwt) where that's an omega, not a w, and electrical engineers for whatever reason prefer the notation exp(kx+jwt) (note the minus sign difference). Except ee's sometimes write exp(kx-jwt), depending on the convention in use at the time.



What are you talking about? i == j, and either squared are equal to negative one. You can use them interchangeably.


Take a look at quaternions (http://en.wikipedia.org/wiki/Quaternion) where ii == jj == -1, but i != j


This discussion is talking about the notation ambiguity of i and j in denoting a classical complex number with only one real and one imaginary part. As far as I can tell, this python bug report has absolutely nothing to do with quaternions, which is an extension on complex numbers.

i == j, not i == -j in most applications. If you take the number z = a + ib and turn it into z = a - jb, and just take Im(z), you end up with two different answers otherwise.


What does Mark Dickinson mean in http://bugs.python.org/issue10562#msg122672 when he says

  'j' for *a* (not *the* </pedantry>) square root of -1 has...


j is often used instead of i in engineering and physics.

When you start talking about charge density, current, phase and frequency, you almost always start reverting back to engineering notation (i == j). In QM we used i. In Complex Analysis, we used i. In CM, with regards to oscillators/harmonic motion, we used i.

The wikipedia article on imaginary units talks about interchanging i and -j denoting the reversal of plane waves, but we never did that in advanced electrodynamics. However, I wouldn't be surprised if some people do, but as far as I know it's not that common. It's probably find for determining the EM field at some point for some time, but for the problems where you have to find the charge density on a surface of conductor induced by a EM wave, this notation would start to get confusing.


You can use i and -i interchangably, as long as you're consistent.


The reason is that i is used to denote (time changing) current in electrical engineering.


i(j) squared is -1 if we're talking about complex numbers and 1 for split-complex numbers. Each is an interesting class of numbers.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: