MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Re: Re: Types in Mathematica thread

On Dec 6, 2005, at 3:58 AM, Andrzej Kozlowski wrote:

> On 6 Dec 2005, at 14:03, Kristen W Carlson wrote:
>> You had me going there, I did look for it :-)
>> Maybe. Another possibility is the ambiguity; an integer, a negative
>> number, a rational, a prime, are all reals.
> Yes, but obviously if the discussion is about types in the sense that
> computer scientists (not me!) use the term, then the type of objects
> with Head Real in Mathematica is exactly what is known as inexact
> numbers, or floating point number or floats etc..

As a programmer, not a professional computer scientist, and someone  
who works with a lot of numeric data I must say I have never seen a  
type hierarchy of numerics in a programming language that made  
mathematics easy.  It seems to me that if one wanted a type hierarchy  
then the root would actually be what is informally considered the  
most complex type (for example complex numbers, but why stop there  
why not quaternions and octonions?  And what about such oddities as  
Chatin's constant and Aleph numbers?) and the descendants would be  
reals, integers etc.  This is almost exactly the reverse of how the  
type hierarchy for numerics is usually defined (in fact it's rarely a  
singly rooted tree but a collection of trees typically rooted at real  
and integer) and still be unwieldy.  For example it would be nice to  
have a class of imaginaries as a descendent of complex values, but  
that cannot be the same as the real class which is a superset of the  
integers and thus in most languages it would be very difficult if not  
impossible to write functions that took integers as arguments and  
returned imaginaries since typically one can return parent or child  
types but not "cousin" types which require breadth first traversal of  
the type hierarchy.

I suppose you could use some sort of set theoretic expression for  
numbers to resolve this problem but I can't imagine that would  
perform acceptably on any physically realizable computer.



  • Prev by Date: Re: inequations
  • Next by Date: Re: FixedPoint stops "when elements no longer change"?
  • Previous by thread: Re: Re: Re: Re: Types in Mathematica thread
  • Next by thread: Re: Re: Re: Re: Re: Types in Mathematica thread