power TypeErrors

Erik Max Francis max at alcyone.com
Thu Nov 7 13:43:06 EST 2002


Fernando Pérez wrote:

> Well, other than the fact that not having them is pretty much a slap
> in the
> face of everybody who does scientific computing, I guess it doesn't
> matter.
> The fact that C lacks native complex numbers is one of the reasons
> many hard
> core numerical computing people still frown upon it (not the only
> one).

Note that in the interests of nitpickery, C99 does have a builtin
complex type.

> The most trivial numerical problem with _real_ numbers can generate
> complex 
> numbers in its solution (think any random polynomial root finding
> problem, or 
> just about any eigenvalue problem you can write). Therefore we *NEEED*
> good 
> complex number support in any language that is going to be taken
> seriously 
> for scientific computing. I'm not sure what your background is, but I
> can 
> tell you that python is gaining _very_ stronng support in scientific 
> computing.

That's probably the best rationalization I've seen for including complex
number support in the language itself.  Implementing a complex number
class oneself is pretty straightforward, and the vast majority of
non-scientific users will never have a need for it, but when you want to
do scientific work and the builtins don't play nice with complex
numbers, it's a huge inconvenience.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ War is like love, it always finds a way.
\__/ Bertolt Brecht
    Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
 A highly categorized list of Web links.



More information about the Python-list mailing list