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 2007

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

Search the Archive

Re: IsExact

  • To: mathgroup at
  • Subject: [mg80550] Re: [mg80523] IsExact
  • From: Carl Woll <carlw at>
  • Date: Sun, 26 Aug 2007 02:57:34 -0400 (EDT)
  • References: <>

carlos at wrote:

>Let c be a 1D list of scalar coefficients, numeric or symbolic,
>real or complex. No entry is a list. Examples:
>I need a function IsExact[c] that returns False if
>at least one entry of c is floating, or if it contains one
>floating number; else True.  For example, tests on
>c1 and c2  should return True; the others False.
>Any simple way to implement this? It should work on V.5.
Use Precision:

IsExact[expr_] := Precision[expr]===Infinity

On your test cases:

In[114]:= IsExact /@ {c1, c2, c3, c4, c5, c6}

Out[114]= {True,True,False,False,False,True}

I don't know why you expect {N[x]} to not be exact. N[x] evaluates to x, 
and {x} doesn't have any approximate numbers in it.

Carl Woll
Wolfram Research

  • References:
    • IsExact
      • From:
  • Prev by Date: Re: FindFit and complex function?
  • Next by Date: Re: FindFit and complex function?
  • Previous by thread: Re: IsExact
  • Next by thread: Re: IsExact