Re: Types in Mathematica thread

*To*: mathgroup at smc.vnet.net*Subject*: [mg62923] Re: Types in Mathematica thread*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Thu, 8 Dec 2005 03:27:33 -0500 (EST)*References*: <A02020009-1043-64AE1BCF9FA447ECA46E2E3F750686E6@QuarkM.local>*Sender*: owner-wri-mathgroup at wolfram.com

On 8 Dec 2005, at 13:21, Bill Rowe wrote: > On 12/6/05 at 3:40 PM, akoz at mimuw.edu.pl (Andrzej Kozlowski) wrote: > >> On 6 Dec 2005, at 14:43, Bill Rowe wrote: > >>> On 12/5/05 at 1:40 PM, akoz at mimuw.edu.pl (Andrzej Kozlowski) 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. > >>> That clearly would not be the equivalent of RealQ since >>> InexactNumberQ[Pi] correctly returns False when RealQ[Pi] would >>> return True if it existed. -- > >> The discussion was not about testing whether something is a real >> number or not (in the mathematical sense). This you test with >> Element [something, Reals]. The discussion was about "types". >> Please note the title of the thread to which you have just >> contributed, or even better rerad the thread. > > It was not clear to me from your comments you were suggesting > InexactNumberQ was testing for a type. > >> Well, the "type" of objects with head Real in Mathematica is exactly >> what InexactNumberQ tests for. A mathematica _Real is not a "real >> number" in the sense of mathematics but precisely an "inexact >> number". >> (Actually, I myself do not agree that that there are "types" in >> Mathematica and that these functions test for "types". > >> But even if it were not a discussion of "types" in any case your >> answer would be quite wrong, since NumberQ[Pi] also gives False, >> and surely Pi is a number? ) > > If you accept Mathematica defines Reals narrowly such Pi is not a > Mathematica Real, then you should also accept Mathematica defines > numbers narrowly. That is Mathematica seems to consider only > Integers, Rationals and inexact Reals as numbers. You are right if you mean that the built in Mathematica expressions to which NumberQ returns True do not include exact reals. And there are only a few exact reals that are Symbols. But, Mathematica also has the domain Reals (quite different from the Head Real) and you can actually do quite many things with Reals. Like: Resolve[ForAll[y, y â?? Reals, Exists[x, x â?? Reals, x^3 == y]]] True Now that means that Mathematica does know somethings about "the mathematical real numbers". Also, the two distinct concepts of Real (inexact reals) and the domain Reals are connected by the fact the Element[real inexact number, Reals] returns True. Andrzej Kozlowski

**Re: Pick function**

**Re: Notebook for Borel-Tanner Distribution**

**Re: Types in Mathematica thread**

**Re: Types in Mathematica thread**