Bug or Feature?

Dang Griffith noemail at noemail4u.com
Tue Nov 25 14:47:11 CET 2003

On Mon, 24 Nov 2003 19:35:51 +0100, Stephan Diehl
<stephan.diehlNOSPAM at gmx.net> wrote:

>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.
>> 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).
And for the set of whole numbers, some divisions are allowed, but any
division that results in a fraction would not be allowed.  By
definition, i.e. a combination of operators and operands that result
in a value not in the same domain is not a valid combination.  It
works, but seems circular.  :-)

More information about the Python-list mailing list