Message Boards Message Boards


Error Message from Compile???

Posted 9 years ago
1 Reply
0 Total Likes

I'm getting the following error message when I try to compile a function. Any help will be greatly appreciated.

In[1]:= cf=Compile[{{p,_Real}},NMaximize[-x^p-3x^2+x,x]]
Out[1]= CompiledFunction[{p},NMaximize[-x^p-3 x^2+x,x],-CompiledCode-]
In[2]:= cf[4]
Out[2]= {0.0825888,{x->0.16374}}
CompiledFunction::cfse: Compiled expression {0.0825888,{x->0.16374}} should be a machine-size integer. >>
CompiledFunction::cfex: Could not complete external evaluation at instruction 1; proceeding with uncompiled evaluation. >>


POSTED BY: Cuneyt Eroglu

Compilation is useful for functions you define, not built-in functions.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract