MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Recognising Exponential Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19876] Re: [mg19827] Recognising Exponential Function
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Sun, 19 Sep 1999 01:20:57 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

The easiest way is to give Operate the HoldRest attribute. You can remove it
later, though I can't see it causing any problems:

In[1]:=
SetAttributes[Operate, HoldRest]

Now

In[31]:=
Operate[p, Exp[x]]
Out[31]=
p[Exp][x]

For example, let

In[2]:=
functions = {};

And let:

In[3]:=
p[f_] := (AppendTo[functions, f]; f)

Now:

In[4]:=
Operate[p, Exp[x]]
Out[4]=
 x
E

and

In[5]:=
functions
Out[5]=
{Exp}
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp


----------
>From: p_mclean at postoffice.utas.edu.au (Patrick McLean)
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg19876] [mg19827] Recognising Exponential Function
>Date: Fri, Sep 17, 1999, 2:37 PM
>

> How can I recognise the expoential function?
>
> Since
>
> Operate[p,Sin[x]]    gives    p[Sin][x]
>
> Operate[p,Exp[x]]    gives    p[Power][E,x].
>
> This is because FullForm[Exp[x]]    is    Power[E,x].
>
> --
> Patrick McLean
>
> No news is good news...
> 


  • Prev by Date: RE: Can't get the 3rd Bessel zero!
  • Next by Date: Re: Can't get the 3rd Bessel zero!
  • Previous by thread: Recognising Exponential Function
  • Next by thread: Re: Recognising Exponential Function