Re: FullSimplify in functions

*To*: mathgroup at smc.vnet.net*Subject*: [mg82591] Re: FullSimplify in functions*From*: "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk>*Date*: Fri, 26 Oct 2007 05:09:33 -0400 (EDT)*References*: <ffpq3s$lbu$1@smc.vnet.net>

If the right hand side of the function definition can be safely evaluated once and for all the do this: f[x_] = FullSimplify[...] otherwise you have to do this (I assume this is what you are doing at the moment): f[x_] := FullSimplify[...] In the first case FullSimplify (and its argument ...) is evaluated only when you define the function. -- Steve Luttrell West Malvern, UK "Michael Mandelberg" <mmandelberg at comcast.net> wrote in message news:ffpq3s$lbu$1 at smc.vnet.net... > What is the best/proper way to incorporate FullSimplify[ ] into a > function definition in such a way that the FullSimplify[ ] executes > only once instead of each time the function is called, i.e. it is > "compiled", though I'm not sure this is the same thing as the > Mathematica Compile[ ] function. > > Michael Mandelberg > >