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

*To*: mathgroup at smc.vnet.net*Subject*: [mg62864] Re: [mg62843] Re: [mg62824] Re: [mg62787] Re: [mg62781] Re: [mg62708] Types in Mathematica thread*From*: Sseziwa Mukasa <mukasa at jeol.com>*Date*: Tue, 6 Dec 2005 23:11:03 -0500 (EST)*References*: <dmp9na$hi2$1@smc.vnet.net> <roadnYOk3NcFDw7eRVn-jg@speakeasy.net> <200512050837.DAA08425@smc.vnet.net> <200512051840.NAA21063@smc.vnet.net> <200512060503.AAA02736@smc.vnet.net> <200512060858.DAA09068@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

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. Regards, Ssezi

**References**:**Re: Types in Mathematica thread***From:*Kristen W Carlson <carlsonkw@gmail.com>

**Re: Re: Types in Mathematica thread***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>

**Re: Re: Re: Types in Mathematica thread***From:*Kristen W Carlson <carlsonkw@Gmail.com>

**Re: Re: Re: Re: Types in Mathematica thread***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>

**Re: inequations**

**Re: FixedPoint stops "when elements no longer change"?**

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

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