 
 
 
 
 
 
Re: Question regarding Compile
- To: mathgroup at smc.vnet.net
- Subject: [mg33698] Re: Question regarding Compile
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 9 Apr 2002 01:02:01 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <a8m33c$oaq$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
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 ?
Regards
  Jens

