Re: Types in Mathematica thread
- To: mathgroup at smc.vnet.net
- Subject: [mg62877] Re: Types in Mathematica thread
- From: Jon Harrop <usenet at jdh30.plus.com>
- Date: Tue, 6 Dec 2005 23:12:13 -0500 (EST)
- References: <dn38ft$3la$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Bill Rowe wrote: > But it is easily added should you want a test for reals using the > same syntax, e.g., > > RealQ[x_]:=Element[x,Reals] > > will do the trick quite nicely. You may also want: RealQ[x_] := Element[x,Reals] === True to guarantee a boolean result, or: RealQ[_Real] := True RealQ[_] := False for equivalence with the Head test "_Real", rather than the mathematical concept of a real number. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html
- Follow-Ups:
- Re: Re: Types in Mathematica thread
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Types in Mathematica thread