Re: A riddle: Functions that return unevaluated when they
- To: mathgroup at smc.vnet.net
- Subject: [mg82449] Re: [mg82394] A riddle: Functions that return unevaluated when they
- From: "W. Craig Carter" <ccarter at mit.edu>
- Date: Sat, 20 Oct 2007 05:58:26 -0400 (EDT)
- References: <200710190859.EAA04845@smc.vnet.net>
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}]} Craig > Date: Fri, 19 Oct 2007 04:59:08 -0400 (EDT) > From: Szabolcs Horv=E1t <szhorvat at gmail.com> > In[1]:= > FindInstance[ > x^3+y^3==z^3 && x>0 && y>0 && z>0, > {x,y,z}, Integers] // Timing > > During evaluation of In[1]:= FindInstance::nsmet: The methods available > to FindInstance are insufficient to find the requested instances or > prove they do not exist. >> > > Out[1]= > {1.156, FindInstance[x^3+y^3==z^3&&x>0&&y>0&&z>0,{x,y,z},Integers]} > > Evaluating this expression takes a relatively long time on my system (~1 > sec). If FindInstance cached its result the way I described above, then > subsequent evaluations should be instantaneous. But they aren't! > > In[2]:= > FindInstance[x^3+y^3==z^3&&x>0&&y>0&&z>0,{x,y,z},Integers]//Timing > > During evaluation of In[2]:= FindInstance::nsmet: The methods available > to FindInstance are insufficient to find the requested instances or > prove they do not exist. >> > > Out[2]= {1.063,FindInstance[x^3+y^3==z^3&&x>0&&y>0&&z>0,{x,y,z},Int= egers]} >
- References:
- A riddle: Functions that return unevaluated when they cannot solve
- From: Szabolcs Horvát <szhorvat@gmail.com>
- A riddle: Functions that return unevaluated when they cannot solve