MathGroup Archive 2001

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

Search the Archive

Re: Preserve natural number "e" using N or SetPrecision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30823] Re: Preserve natural number "e" using N or SetPrecision
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 20 Sep 2001 03:51:15 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9o973r$cfd$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

NSaveE[expr_, prec___] := Block[{E = ee},
      N[expr, prec]
      ] /. ee -> E


will do it.

Regards
  Jens

Guillermo Sanchez wrote:
> 
> When it is used N or SetPrecision in expresions involving the natural
> number "e" Mathematica gives the output showing "e" as a numeric value
> i.e:
> 
> int[]:=N[0.19884 Exp[-2.0000000037 t], 5]
> 
> out[]:=0.19884 2.71828^(-2. t)
> 
> or
> 
> int[]:=SetPrecision[0.19884 Exp[-2.0000000037 t],3]
> 
> out[]:=0.199 2.72^(-2. t)
> 
> But I wish see in the output the simbolic notation of "e" better than
> the numeric value. Any help?


  • Prev by Date: Combinatorica
  • Next by Date: Re: Sum of Prime factors
  • Previous by thread: Re: Preserve natural number "e" using N or SetPrecision
  • Next by thread: Re: Preserve natural number "e" using N or SetPrecision