Am 25.07.2011 09:56, schrieb Patricia Shanahan:
Historically, complex numbers were indeed invented by and for
mathematicians for the abstract satisfaction of having solutions for all
quadratic equations.
Not at all! There was simply no need to solve quadratic equations like
x^2 + 4 = 0 simply because everyone knew, and it was obvious, that this
equation *does not have* a solution.
Complex numbers were invented as a tool to solve *cubic* equations. The
tricky thing is that, if you want to solve a cubic equation, you *know*
that it must either have one, two or three solutions, ever. However, in
the three-solution case, a closed formula for computing the solutions
was found, but this equation required you, somewhere in the middle, to
handle with roots of negative numbers. All these strange negative roots
then vanish again in the final solution using rules like sqrt(-1) *
sqrt(-1) = -1, and then cancel out, so everything was "correct" in the
end. All what happened then is that these rules for manipulating the
strange temporary = "imaginary" numbers where written down, and *this*
gave the complex numbers.
Thus, complex numbers weren't an abstract invention by crazy
mathematicians trying to solve what wasn't possible to solve, but rather
as a toolkit to solve something very practical, namely to apply an
algorithm for solving cubic(!) equations. This is very much a useful
task, as it is to use complex numbers to describe AC currents.
That java lacks operator overloading is a historic decision, probably
taken on the basis that C++ started with this feature, and everyone
considered it "so cool" that it was misused for all types of nonsense.
Basically, I don't consider the choice of the C++ STL to use << and >>
operators for input and output a sane one, and probably the java
language designers had the same impression, so wanted to avoid it, but
then overdid it by disallowing operator overloading in total.
Nowadays, one can probably say that operator overloading *is* a useful
tool, but as for all useful tools it is one that should be handled with
care, and a tool that can cause quite some trouble in the hands of
fools. Thus, what C++ overdid, and Java "under"-did. From today's
perspective, I *would* prefer to have operator overloading in java, but
apply it only where it makes sense and the semantics of operators is
correct. That is, apply it to numeric types (numbers including complex
numbers, matrices, vectors). Appyling it to I/O as does C++ is, IMHO,
not a good idea.
Greetings,
Thomas