Re: Types in Mathematica thread
- To: mathgroup at smc.vnet.net
- Subject: [mg62848] Re: Types in Mathematica thread
- From: Jon Harrop <usenet at jdh30.plus.com>
- Date: Tue, 6 Dec 2005 23:10:17 -0500 (EST)
- Organization: Flying Frog Consultancy Ltd.
- 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> <dn3jsl$8s0$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Andrzej Kozlowski wrote: > 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. or intervals. As I've said, using Head is not a generally useful definition of "type" in the context of Mathematica code: In[1]:= Head[Sqrt[2]] Out[2]= Power > Mathematica does not know it but correctly computes its numerical > approximation: > > NSum[10^(-k!), {k, 1, Infinity}] > > 0.110001 > > But in any case, all this has nothing to do with "types" in the sense > of computer science. The word "type" means different things to different people even within computer science. Some type systems provide numerics in the type system, even if it is accidental (e.g. church numerals encoded in C++ templates). -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html
- Follow-Ups:
- Re: Re: Types in Mathematica thread
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Types in Mathematica thread
- 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: Types in Mathematica thread