itsme at yahoo.com
Tue Jan 11 18:01:27 EST 2005
You are focusing on computational type applications of complex numbers. For
those, you can do it with any languages - including machine language. It's
just a matter of how much headache you want.
For instance, when constructing "software lego parts" (such as the
Matlab/Simulink type), it's very annoying that you need to know what kind of
signal comes in and goes out. In Malab/Simulink, for instance, you specify
that the signal is of the "inherit" type (meaning you don't care what type
it is - just process it). In Python, it's of type "duck", just pass it
on...I don't need to care if it's real or complex. I don't need to devise
yet another overloaded operator or function whenever I encounter a situation
where the native language doesn't handle.
"Anno Siegel" <anno4000 at lublin.zrz.tu-berlin.de> wrote in message
news:cs17od$ag1$1 at mamenchi.zrz.TU-Berlin.DE...
> What kind of awareness do you mean?
> There are some operations (as comparison) that work for reals, but not
> for complex numbers. If you want your program to run with complex input,
> you have to avoid such operations, whether the data type is native or not.
> What other considerations are there? A typical numeric program should
> just run and give complex output when fed complex input. I made the
> experiment with the Perl module Statistics::Descriptive, which was
> certainly written without concern for complex input, and it works without
> a hitch. I'm not sure if the (complex) variance of several complex
> numbers is a reasonably interpretable quantity, but I'm certain the
> maths is done right. What else do you want?
More information about the Python-list