Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Re: Types in Mathematica thread

  • To: mathgroup at
  • Subject: [mg62918] Re: [mg62877] Re: Types in Mathematica thread
  • From: Andrzej Kozlowski <akoz at>
  • Date: Thu, 8 Dec 2005 00:06:24 -0500 (EST)
  • References: <dn38ft$3la$> <>
  • Sender: owner-wri-mathgroup at

On 7 Dec 2005, at 13:12, Jon Harrop wrote:

>   RealQ[_Real] := True
>   RealQ[_] := False
> for equivalence with the Head test "_Real", rather than the  
> mathematical
> concept of a real number.

Of course this is not fool-proof:

  RealQ[_Real] := True
   RealQ[_] := False

x=Real["I am not a number"];



One can, of course deal, with such perversity by:

  RealQ[x_Real] /; AtomQ[x] == True := True
   RealQ[_] := False


RealQ[x_Real] /; InexactNumberQ[x] == True := True
   RealQ[_] := False

Andrzej Kozlowski

  • Prev by Date: Re: Bug in Graphics output of Circle primitive?
  • Next by Date: Spatial Econometrics and NonParametrics Packages available on my website.
  • Previous by thread: Re: Types in Mathematica thread
  • Next by thread: Re: Types in Mathematica thread