Bug or Feature?

Stephan Diehl stephan.diehlNOSPAM at gmx.net
Mon Nov 24 13:35:51 EST 2003


Dang Griffith wrote:

> On Mon, 24 Nov 2003 18:13:34 +0100, Stephan Diehl
> <stephan.diehlNOSPAM at gmx.net> wrote:
> 
> ...
>>This is probably more a theoretical question, but if I decide to have an
>>operation within one specific domain, I want the result in that domain
>>too. Otherwise, there would be no point at all to define such a numeric
>>class at all.
>>
>>Stephan
> 
> I understand what you're saying, but there's no universal rule that
> says that the result of operations between members of a set are also
> members of the set.  Obvious examples include division on the set of
> integers, and division over the set of real numbers, i.e.division by
> zero is not a real number.
>    --dang

If we have a look at the mathematical definition of numbers, the interesting
thing is not the set of these numbers, but the set combined with some
usefull operators (like addition and multiplication).
It is (mathematicaly speaking) not possible to have a result under these
operations that are outside the definition.

In that sense, there IS this universal rule, you were talking about. (and
division by zero is just not allowed by definition).

Stephan




More information about the Python-list mailing list