Re: Re: Re: Re: Types in Mathematica thread
- To: mathgroup at smc.vnet.net
- Subject: [mg62843] Re: [mg62824] Re: [mg62787] Re: [mg62781] Re: [mg62708] Types in Mathematica thread
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Tue, 6 Dec 2005 03:58:48 -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>
- Sender: owner-wri-mathgroup at wolfram.com
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..
>
> Andrzej, why there isn't a test for transcendentals--TranscendentalQ.
> That's a joke but I always wanted to see how pi and E were proved to
> be transcendental. I wonder if there is an algorithm to capture some
> of them, classes of them or something. Those proofs, since they are
> finite, must capture some commonality.
Well, actually the proofs for E and Pi are quite different. The proof
of the transcendentality of E was given by Hermite and that of Pi by
Lindemann about a decade later (both in the 19th century). Actually,
it is quite easy to prove that E is transcendental (a simple proof
was given by Hilbert). Hilbert also gave a proof of the fact that Pi
is transcendental, which is simpler than Lindemann's original one,
but still much harder than the proof for Pi. Many years ago as an
undergraduate student I saw Hilbert's proof of the trancendentality
of E done in a number theory class but all I remember now is that you
start by assuming that there is a polynomial with integer
coefficients whose root is E, and than you use properties of some
infinite integrals involving E to prove that this is impossible. I
have no idea how one proves that Pi is transcendental, but I suppose
the general scheme must be similar. It is much easier to prove that
there are transcendental numbers (actually, if you accept Cantor's
diagonal argument - Kronecker did not - then it is almost trivial).
In fact one can also construct explicit numbers for which it is easy
to prove that they are transcendental: the first one was constructed
by Liouville. This number, the Liouville constant, is
Sum[10^(-k!),{k,1,Infinity}]
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.
Andrzej Kozlowski
>
> Kris
>
> On 12/5/05, Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote:
>>
>> On 5 Dec 2005, at 17:37, Kristen W Carlson wrote:
>>
>>> I can't think of why there is no RealQ predicate, but there is
>>> _Real,
>>> a pattern test via the head.
>>>
>>
>> Maybe because it is called InexactNumberQ.
>>
>> Andrzej Kozlowski
>>
>>
>
- Follow-Ups:
- Re: Re: Re: Re: Re: Types in Mathematica thread
- From: Kristen W Carlson <carlsonkw@gmail.com>
- Re: Re: Re: Re: Re: Types in Mathematica thread
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Re: Re: Re: 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