So what exactly is a complex number?
Roy Smith
roy at panix.com
Tue Sep 4 14:28:20 CEST 2007
In article <mailman.8.1188882659.2658.python-list at python.org>,
Steve Holden <steve at holdenweb.com> wrote:
> Roy Smith wrote:
> > Boris Borcic <bborcic at gmail.com> wrote:
> >> Complex numbers are like a subclass of real numbers
> >
> > I wouldn't use the term "subclass". It certainly doesn't apply in the same
> > sense it applies in OOPLs. For example, you can't say, "All complex
> > numbers are real numbers". In fact, just the opposite.
> >
> > But, it's equally wrong to say, "real numbers are a subclass of complex
> > numbers", at least not if you believe in LSP
> > (http://en.wikipedia.org/wiki/Liskov_substitution_principle). For example,
> > it is true that you can take the square root of all complex numbers. It is
> > not, however, true that you can take square root of all real numbers.
> >
> That's not true. I suspect what you are attempting to say is that the
> complex numbers are closed with respect to the square root operation,
> but the reals aren't.
Yes, that's what I was trying to say.
> I don't think "subclass" has a generally defined meaning in mathematics
That may be true, but this is a programming newsgroup, so I was using a
programming sort of definition.
More information about the Python-list
mailing list