Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: A riddle: Functions that return unevaluated when they

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82481] Re: A riddle: Functions that return unevaluated when they
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Sun, 21 Oct 2007 05:11:41 -0400 (EDT)
  • References: <200710190859.EAA04845@smc.vnet.net> <ffckd0$slm$1@smc.vnet.net>

W. Craig Carter wrote:
> Dear Szabolcs,
> 
> I am not getting this timing behavior in another instance,
> using a fresh kernel:
> 
> e.g.,
> In[1] = FindInstance[a > b && b > c, {a, b}] // Timing
> returns an FindInstance::exvar error, and the result
> Out[1]= {0.036232, FindInstance[a > b && b > c, {a, b}]}
> 
> But,
> In[2] = FindInstance[a > b && b > c, {a, b}] // Timing
> also returns an FindInstance::exvar error, but the result
> Out[2] = {0.002348, FindInstance[a > b && b > c, {a, b}]}

Thanks for the reply!

The problem is that such short timing are not reliable.  Mathematica is 
doing many things in the background that may influence the timing of the 
first evaluation: loading symbols, creating new symbols, automatically 
caching at least some results ... The timings I get on Windows are not 
very stable, two consecutive evaluations of the same expression 
sometimes differing by as much as 0.1 seconds.

But when FindInstance[], Integrate[], or similar functions take a "long" 
time to evaluate (>= 1 second), this behaviour (re-revaluation every 
time I type the input) in reproducible.

-- 
Szabolcs


  • Prev by Date: Satellite Visualization!
  • Next by Date: Re: Re: Adding current style name to window title or status
  • Previous by thread: Re: A riddle: Functions that return unevaluated when they
  • Next by thread: Animate with Slider Box Value