Message Boards Message Boards

0
|
11208 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Error Message from Compile???

Posted 10 years ago

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. >>

~Cuneyt

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
Attachments
Remove
or Discard

Group Abstract Group Abstract