RE: Evaluating expressions in pure functions
- To: mathgroup at smc.vnet.net
- Subject: [mg28470] RE: [mg28453] Evaluating expressions in pure functions
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 20 Apr 2001 04:24:18 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Max, Pure functions have the attribute HoldAll so they don't automatically simplify. For simple pure functions, at least, you can simplify with the following routine. The Evaluate is necessary. purefunctionSimplify := Evaluate /@ (Simplify /@ #) & Then Exp[2*3*#] & // purefunctionSimplify E^(6*#1) & David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > From: Max Ulbrich [mailto:ulbrich at biochem.mpg.de] To: mathgroup at smc.vnet.net > > Hi, > > I have the following problem: > I have a pure function with a product of numbers in it. > Mathematica doesn't evaluate the product: > > Exp[2*3*#]& > > I just want to get > > Exp[6*#]& > > How can I make Mathematica do this? > Thanks, > > Max > >