MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question regarding Compile

Madhusudan Singh wrote:
> I apologise if this question (or something like this) has been asked
> earlier.
> I have a slew of functions like :
> f1[p1_,p2_,p3_]:= <some fn.>
> f2, f3 similarly defined.
> f5[x_,y_,z_]:=F(f1[..],f2[..],f3[..],f4[..]);
> Now, this particular computation proceeds very slowly and I wish to speed
> it up by compiling my functions. However, the very syntax of Compile
> indicates that I cannot invoke a Compile'd function and pass arguments to
> it.

You can not do *what* ? and what may

f5 = Compile[{{x, _Real}}, Sin[x]]

f[x_] := x^2

Plot[f[f5[x]], {x, 0, Pi}]

do ?

and what does

f6 = Compile[{{x, _Real}}, f5[x]^2]

Plot[f6[x], {x, 0, Pi}]

> For instance,
> f1=Compile[{p1,p2,p3}, <some expression>] cannot be used in f5 above the
> way I have been doing. 

What *is* the way you are using ? if you can't call a compiled function
from a compiled function ?


  • Prev by Date: Different Methods inside one package
  • Next by Date: Re: function assignment to list of functions
  • Previous by thread: Question regarding Compile
  • Next by thread: Re: Question regarding Compile