[Numpy-discussion] Re: numpy, overflow, inf, ieee, and rich comparison

Rainer Deyke root at rainerdeyke.com
Thu Oct 26 00:45:38 EDT 2000


"Huaiyu Zhu" <hzhu at users.sourceforge.net> wrote in message
news:slrn8vf4ne.v3.hzhu at rocket.knowledgetrack.com...
> If "serious" just means "having to deal with this stuff very often", it
> depends on what they actually do.  It is possible in some circumstances
that
> having the results being of the same type of the operands is convenient.
> Such shortcuts are not natural and they are not obvious to new-commers.

Non-integers are only useful in extremely limited problem domains.

> So let's ask the question in another way: Is there a technical reason
> (performance, implementation details, etc) not to have a rational type,
> given the existence of a complex type?

Yes, but not a very good one. :-)  Expressions that mix complex numbers with
rationals are inherently messy, since a complex number with rational
non-zero components has an irrational absolute value.

In the existance of long integers, rationals should be almost trivial to
implement.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list