- To: mathgroup at smc.vnet.net
- Subject: [mg87063] Re: [mg87011] IsIntegerOrFloat
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 30 Mar 2008 01:19:04 -0500 (EST)
- References: <200803290921.EAA16390@smc.vnet.net>
One possibility is:
VectorQ[expr, NumberQ[#] && (Head[#] =!= Rational) && (Head[#] =!=
and so on.
On 29 Mar 2008, at 10:21, carlos at colorado.edu wrote:
> Thanks to all who replied to my previous questions. Those functions
> fine now. Here is another question - I apologize if it has been
> asked before.
> I need a function
> that returns True if expr, which is generally a flat list, contains
> only integers or floating point numbers, and False otherwise.
> Rational numbers such as 1/2 are considered symbolic for this test;
> so is
> \[Pi] or Sqrt. Appearance of any symbol, as in 2.0*a+3.5, makes
> it False.
> As in previous questions, this should work on versions >=4.0.
> Use: unified printing of simulation data structures in table formats.
> Expressions containing only integers or floats are filtered through
> PaddedForm and ToString, others through Symbol. The end
> result (a flat table of strings) is filtered through TableForm with
> appropriate options.
Prev by Date:
Re: Re: symbolic evaluation
Next by Date:
Re: Re: Wrapping text to fit a rectangle
Previous by thread:
Next by thread: