MathGroup Archive 1997

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9717] How to get E**(-x), not 1/E**(x) ?
  • From: ma zhanwen <mazw at mail.phy.ornl.gov>
  • Date: Tue, 25 Nov 1997 00:06:13 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

When I input an expression which containing natural logarithm exp(-x),
where x is a symbol,  and I want to get the fortran form output. For
example, If the input is : 

     FortranForm[ y*Exp[-x] ]  where y is an arbitrary expression.

the output will be :

     y/E**(x)

Of course it is not wrong. But if I copy the output into a Fortran
program, when x is assigned a enough large positive value , the Fortran
program will overflow. But if it is y*E**(-x) , there will be no
problem. You may say that why not change y/E**(x) to be y*E**(-x)
yourself , It is because I have a great number of this kind of
expressions. It is a hard work to change them one by one and it is very
easy to make mistakes.

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 



  • Prev by Date: Re: Frontend bug
  • Next by Date: sqrt[x^2]
  • Previous by thread: Re: Matrix Inversion Method ?
  • Next by thread: Re: How to get E**(-x), not 1/E**(x) ?