MathGroup Archive 1999

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

Search the Archive

Re: Pi vs. 3.141592654


Hi,

a) Mathematica saves all computed values like N[Pi]. The first time
   Timing[N[Pi,300]] gives the result to calculate Pi the second
Timing[N[Pi,400]]
   uses only the already calculated value. Thats why it is faster.
b) How can you avoid Pi ? There is no serious mathematical relation
   with out Pi

Regards
  Jens

Blimbaum Jerry DLPC wrote:
> 
>         I was trying to understand the use of the command TracePrint, so I
> tried the following:
> 
>         f[x_]: = x;
>         f[1]//TracePrint                and got an output with about 4 steps
> involved, but then I tried
> 
>         f[Pi/2]//TracePrint           which came out with about 17 steps
> involved!!
> 
>         This made me wonder since I see Pi used so many times for
> calculating tables or as limits when plotting functions,  so
>         I tried the following timing comparison.
> 
>          <<...>>
> 
>         and got Time outputs of   3.19 and 0.77 seconds respectively!!!   a
> factor of greater then 4 between them.
> 
>         Should I conclude that I need to avoid using Pi in expressions, etc.
> if I want to reduce processing time?
> 
>         Thanks.   Jerry Blimbaum   NSWC  Panama City, Fl
>


  • Prev by Date: Re: RealTime3D
  • Next by Date: Re: INDEFINITE INTEGRALS
  • Previous by thread: Re: RealTime3D
  • Next by thread: mathematica 3.0 and Cyrix 200Mhz MediaGX chip