|
[Date Index]
[Thread Index]
[Author Index]
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
>
>
Prev by Date:
controlling whether notebook sections open on evaluation
Next by Date:
Re: Evaluating expressions in pure functions
Previous by thread:
Re: Evaluating expressions in pure functions
Next by thread:
Re: Evaluating expressions in pure functions
|