| Author |
Comment/Response |
Bill Simpson
|
11/08/12 2:15pm
Can you reproduce this?
In[1]:= fc=Compile[{x},x^2+1]; fc[3]
Out[2]= 10.
In[3]:= g=x^2+1; gc=Compile[{x},g]; gc[3]
From In[3]:= CompiledFunction::cfse: Compiled expression 1 + x^2 should be a machine-size real number.
From In[3]:= CompiledFunction::cfex: External evaluation error at instruction 2; proceeding with uncompiled evaluation.
Out[5]= 1 + x^2
In[6]:= g=x^2+1; gc=Compile[{x},Evaluate[g]]; gc[3]
Out[8]= 10.
URL: , |
|