MathGroup Archive 2005

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

Search the Archive

Re: Types in Mathematica thread


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


  • Prev by Date: Re: Re: Types in Mathematica, a practical example
  • Next by Date: Re: Re: Types in Mathematica
  • Previous by thread: Re: Types in Mathematica thread
  • Next by thread: Re: Re: Types in Mathematica thread