MathGroup Archive 2001

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

Search the Archive

Can Anyone Help With This?


Hello,

I was wondering if it is possible to turn on/off a verbose mode of printing when
running modules in Mathematica.

I have the following segment that I'd like to code, but with the ability to turn
on/off printing of intermediate results.

Here is the algorithm (for example).

Step 0: N = random odd number.
Step 1: K = N+1, P = 1, Q = (1-D)/4, D = 1-4Q
Step 2: Let Kr Kr-1 ... K0 be the binary expansion of K.
Step 3: Set U = 1 and V = P.
Step 4: For i = r-1 to 0,
Set (U, V) = (UV mod N, (V^2 + DU^2)/2 mod N)
If Ki = 1, then also set
(U, V) = ( (PU +V)/2 mod N, (PV + DU)/2 mod N)
Step 5: Uk = U and Vk = V

Is it possible to turn on/off the intermediate results of (U, V)?

Thank you for any input ... Wilson



  • Prev by Date: Re: Saving the whole workspace...
  • Next by Date: Can This Be Made Cleaner
  • Previous by thread: Re: Integration by substitution
  • Next by thread: RE: Can Anyone Help With This?