# (in)exactness of complex numbers

David C. Ullrich ullrich at math.okstate.edu
Wed Aug 1 15:32:52 CEST 2001

```On Wed, 01 Aug 2001 14:45:14 +1200, Greg Ewing
<greg at cosc.canterbury.ac.nz> wrote:

>"David C. Ullrich" wrote:
>>
>> But why should the real and imag of a complex be required to be
>> floats in the first place? Why  shouldn't they be allowed to be
>> floats or rationals or integers?
>
>A complex number, in the mathematical sense, is
>not a pair of other numbers -- that's just one
>way of *representing* a complex number.

Well thanks for clarifying _that_. Duh.

(Not that it makes any difference here, but
since you undertstand the math so much better
than I do: Exactly what definition of
"complex number" do you have in mind here?
The _standard_ definition _is_ "pair of
real numbers".)

>If you have some application for which you
>need pairs of numbers that are restricted to
>being integers or whatever, they're not really
>complex numbers, and so you can't blame Python's
>complex type for not helping you.

What a silly point of view. Suppose that the only
"real" numbers in Python were floats, no integers.
Someone says that exact integers would be nice.
You point out that an integer is not really a real
number (which is true in some sense) and therefore
we can't expect Python "real numbers" to include
ints as well as floats.

I mean I've said _many_ times that this was not
an actual request. But the fact that an
integer-complex is in some sense not
"really" a complex number seems exactly as
pertinent to the question of how Python should
work as the fact that an integer is in some
sense not a real number.

>--
>Greg Ewing, Computer Science Dept, University of Canterbury,
>Christchurch, New Zealand