MathGroup Archive 1997

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

Search the Archive

Re: How to get E**(-x), not 1/E**(x) ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9782] Re: How to get E**(-x), not 1/E**(x) ?
  • From: Rolf Mertig <Rolf at Mertig.com>
  • Date: Fri, 28 Nov 1997 05:34:59 -0500
  • Organization: Mertig Research & Consulting
  • Sender: owner-wri-mathgroup at wolfram.com

ma zhanwen wrote:
....
> So can you tell me how to force Mathematica to give me y*E**(-x), not
> y/E**(x) ??
> 
> Many thanks for your help
> 
> Zhanwen Ma
> 
> Oak Ridge National Lab.
> Physics Division
> 
> Oak Ridge ,TN 37831-6354

One possibility is:


In[1]:=  Unprotect[Times];

In[2]:=  Format[y_/Exp[x_], FortranForm]:=y*E^neg[x]

In[3]:= Format[neg[z_],FortranForm]:= -z

In[4]:= a b c / Exp[y] //FortranForm

Out[4]//FortranForm= a*b*c*E**(-y)

In[5]:= x Exp[-z u] //FortranForm

Out[5]//FortranForm= E**(-(u*z))*x


-- 

Rolf Mertig
http://www.mertig.com


  • Prev by Date: Re: Ray-tracing with CorelDream3d?
  • Next by Date: Re: subscripted variables
  • Previous by thread: Re: How to get E**(-x), not 1/E**(x) ?
  • Next by thread: sqrt[x^2]