Re: FullSimplify in functions
- To: mathgroup at smc.vnet.net
- Subject: [mg82598] Re: FullSimplify in functions
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Fri, 26 Oct 2007 05:13:09 -0400 (EDT)
- References: <ffpq3s$lbu$1@smc.vnet.net>
Michael Mandelberg wrote: > 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. > No, no, compilation is something *completely* different. You probably mean result caching: Instead of f[input_] := (...) use f[input_] := f[input] = (...) This way the function 'f' will remember all the results it has computed. -- Szabolcs