MathGroup Archive 2005

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

Search the Archive

Re: Re: Re: Types in Mathematica thread

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62824] Re: [mg62787] Re: [mg62781] Re: [mg62708] Types in Mathematica thread
  • From: Kristen W Carlson <carlsonkw at Gmail.com>
  • Date: Tue, 6 Dec 2005 00:03:51 -0500 (EST)
  • References: <dmp9na$hi2$1@smc.vnet.net> <roadnYOk3NcFDw7eRVn-jg@speakeasy.net> <200512050837.DAA08425@smc.vnet.net> <200512051840.NAA21063@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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. Maybe the designers left
it to us to more specifically design a test for what we want. From
Help 3.1.1:

"One way to find out the type of a number in Mathematica is just to
pick out its head using Head[expr]. For many purposes, however, it is
better to use functions like IntegerQ which explicitly test for
particular types. Functions like this are set up to return True if
their argument is manifestly of the required type, and to return False
otherwise. As a result, IntegerQ[x] will give False, unless x has an
explicit integer value."

I wonder what pattern test those Q tests actually translate into.
Probably simple, but still helpful in designing our own.

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.

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
>
>


  • Prev by Date: Re: Extracting just the value of the variable from the result of Solve/NDSolve
  • Next by Date: Re: Extracting just the value of the variable from the result of Solve/NDSolve
  • Previous by thread: Re: Re: Types in Mathematica thread
  • Next by thread: Re: Re: Re: Re: Types in Mathematica thread