Transcendental Numbers

sqrmax at cvtci.com.ar sqrmax at cvtci.com.ar
Wed Feb 4 12:38:23 UTC 1998


Hi.

>>> I don't know... there are non commutative maths. This could be a 
problem 
>>> later.
>True, there are non-commutative maths, but the ones that I can think of
>offhand that are generalizations of the ones implemented in Squeak, such
>as quaternions and Cayley numbers, are built out of components which are
>manipulated by commutative operators.

It wouldn't be nice to put CayleyNumber as subclass of Number. Even the 
class Complex doesn't fit nicely under Number, because of the #> and #< that 
also troubles Point's implementation under Number or something alike. Another 
number set that doesn't fit under Number is the ModInteger number set. And ok, 
they are all numbers of this kind or the other, but they won't multiply 
between themselves in all cases. What's the sense of multiplying a modInteger by 
aFloat? So it looks as if there are a lot of numbers (another one: Gauss' 
integers) that don't fit as a subclass of Number. Maybe Number isn't what it's 
named after.

>So it seems reasonable to build the general number system such that the 
>standard operators (addition and multiplication in particular) are 
commutative
>and then design the non-commutative systems with the appropriate 
constraints,
>rather than constraining the base number systems to favor the more complex 
>and less-used non-commutative systems.

I agree with this... although I still don't like the picture. I feel Number 
as too big for what it is. Look at Number's subclasses. There are Integers, 
Floats, and Fractions. All particular subsets of the rationals, which are 
commutative. But Numbers are not only rationals.

Andres.





More information about the Squeak-dev mailing list