Mathematica 9 is now available
Student Support Forum
Student Support Forum > General > > "Compile and ascription"

Post Reply:
Email Address:

Please send email when my message is replied to.

Url (optional):
Message: view original message?
Attachment (optional):
Please answer this:6+2 =

Original Message (ID '117531') By Bill Simpson:
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.