Complex literals (was Re: I am never going to complain about Python again)

Christian Gollwitzer auriocus at gmx.de
Thu Oct 10 15:08:24 EDT 2013


Am 10.10.13 18:54, schrieb Grant Edwards:
> On 2013-10-10, Chris Angelico <rosuav at gmail.com> wrote:
>> On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards <invalid at invalid.invalid> wrote:
>>> Nope.  "i" is electical current (though it's more customary to use
>>> upper case).  "j" is the square root of -1.
>>>
>>>> and that hypercomplex numbers include i, j, k, and maybe even other
>>>> terms, and I never understood where j comes from. Why is Python
>>>> better for using j?
>>>
>>> Because that's the way we do it in electrical engineering.
>>
>> Okay, so hold on a minute... a hypercomplex number is the sum of a
>> real number, some electrical current, an imaginary number, and k?
>
> I don't know that EE's ever encounter hypercomplex numbers (I
> certainly never have)

But they are very useful to represent 3D-rotation around an inclined 
axis (look up quaternion rotation). I don't know whether EEs work in 
aircraft navigation, but I suspect they do ;)

	Christian




More information about the Python-list mailing list