1. what does it mean

2. ** REGISTER to REMOVE This Ad On The Site!! **
3. Number crunching.

One of the most famous examples.
&nbsp; program piqp

c&nbsp; This program employs the recently discovered digit extraction scheme
c&nbsp; to produce hex digits of pi.&nbsp; This code is valid up to ic = 2^24 on
c&nbsp; systems with IEEE arithmetic.

&nbsp; &nbsp; &nbsp; real*8 pid, s1, s2, s3, s4, series
&nbsp; &nbsp; &nbsp; parameter (ic = 100000, nhx = 12)
&nbsp; &nbsp; &nbsp; character*1 chx(nhx)

c&nbsp; ic is the hex digit position -- output begins at position ic + 1.

&nbsp; &nbsp; &nbsp; s1 = series (1, ic)
&nbsp; &nbsp; &nbsp; s2 = series (4, ic)
&nbsp; &nbsp; &nbsp; s3 = series (5, ic)
&nbsp; &nbsp; &nbsp; s4 = series (6, ic)
&nbsp; &nbsp; &nbsp; pid = mod (4.d0 * s1 - 2.d0 * s2 - s3 - s4, 1.d0) + 1.d0
&nbsp; &nbsp; &nbsp; call ihex (pid, nhx, chx)
&nbsp; &nbsp; &nbsp; write (6, 1) ic, pid, chx
1&nbsp; &nbsp; format (&#39;Pi hex digit computation&#39;/&#39;position =&#39;,i12,&#39; + 1&#39;/
&nbsp; &nbsp; &#036;&nbsp; f20.15/12a1)

&nbsp; &nbsp; &nbsp; stop
&nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; subroutine ihex (x, nhx, chx)

c&nbsp; This returns, in chx, the first nhx hex digits of the fraction of x.

&nbsp; &nbsp; &nbsp; real*8 x, y
&nbsp; &nbsp; &nbsp; character*1 chx(nhx), hx(0:15)
&nbsp; &nbsp; &nbsp; data hx/&#39;0&#39;, &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;, &#39;6&#39;, &#39;7&#39;, &#39;8&#39;, &#39;9&#39;, &#39;A&#39;,
&nbsp; &nbsp; &#036;&nbsp; &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;, &#39;F&#39;/

&nbsp; &nbsp; &nbsp; y = abs (x)

&nbsp; &nbsp; &nbsp; do i = 1, nhx
&nbsp; &nbsp; &nbsp; &nbsp; y = 16.d0 * (y - aint (y))
&nbsp; &nbsp; &nbsp; &nbsp; chx(i) = hx(int(y))
&nbsp; &nbsp; &nbsp; enddo

&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; function series (m, ic)

c&nbsp; This routine evaluates the series&nbsp; sum_k 16^(ic-k)/(8*k+m)
c&nbsp; using the modular exponentiation technique.

&nbsp; &nbsp; &nbsp; real*8 ak, eps, expm, p, s, series, t
&nbsp; &nbsp; &nbsp; parameter (eps = 1d-17)

&nbsp; &nbsp; &nbsp; s = 0.d0

c&nbsp; Sum the series up to ic.

&nbsp; &nbsp; &nbsp; do k = 0, ic - 1
&nbsp; &nbsp; &nbsp; &nbsp; ak = 8 * k + m
&nbsp; &nbsp; &nbsp; &nbsp; p = ic - k
&nbsp; &nbsp; &nbsp; &nbsp; t = expm (p, ak)
&nbsp; &nbsp; &nbsp; &nbsp; s = mod (s + t / ak, 1.d0)
&nbsp; &nbsp; &nbsp; enddo

c&nbsp; Compute a few terms where k >= ic.

&nbsp; &nbsp; &nbsp; do k = ic, ic + 100
&nbsp; &nbsp; &nbsp; &nbsp; ak = 8 * k + m
&nbsp; &nbsp; &nbsp; &nbsp; t = 16.d0 ** (ic - k) / ak
&nbsp; &nbsp; &nbsp; &nbsp; if (t .lt. eps) goto 100
&nbsp; &nbsp; &nbsp; &nbsp; s = mod (s + t, 1.d0)
&nbsp; &nbsp; &nbsp; enddo

100&nbsp; continue

&nbsp; &nbsp; &nbsp; series = s
&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; &nbsp; end

&nbsp; &nbsp; &nbsp; function expm (p, ak)

c&nbsp; expm = 16^p mod ak.&nbsp; This routine uses the left-to-right binary
c&nbsp; exponentiation scheme.&nbsp; It is valid for&nbsp; ak <= 2^24.

&nbsp; &nbsp; &nbsp; parameter (ntp = 25)
&nbsp; &nbsp; &nbsp; real*8 ak, expm, p, p1, pt, r, tp(ntp)
&nbsp; &nbsp; &nbsp; save tp
&nbsp; &nbsp; &nbsp; data tp/ntp*0.d0/

c&nbsp; If this is the first call to expm, fill the power of two table tp.

&nbsp; &nbsp; &nbsp; if (tp(1) .eq. 0.d0) then
&nbsp; &nbsp; &nbsp; &nbsp; tp(1) = 1.d0

&nbsp; &nbsp; &nbsp; &nbsp; do i = 2, ntp
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tp(i) = 2.d0 * tp(i-1)
&nbsp; &nbsp; &nbsp; &nbsp; enddo
&nbsp; &nbsp; &nbsp; endif

&nbsp; &nbsp; &nbsp; if (ak .eq. 1.d0) then
&nbsp; &nbsp; &nbsp; &nbsp; expm = 0.d0
&nbsp; &nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; &nbsp; endif

c&nbsp; Find the greatest power of two less than or equal to p.

&nbsp; &nbsp; &nbsp; do i = 1, ntp
&nbsp; &nbsp; &nbsp; &nbsp; if (tp(i) .gt. p) goto 100
&nbsp; &nbsp; &nbsp; enddo

100&nbsp; pt = tp(i-1)
&nbsp; &nbsp; &nbsp; p1 = p
&nbsp; &nbsp; &nbsp; r = 1.d0

c&nbsp; Perform binary exponentiation algorithm modulo ak.

110&nbsp; continue

&nbsp; &nbsp; &nbsp; if (p1 .ge. pt) then
&nbsp; &nbsp; &nbsp; &nbsp; r = mod (16.d0 * r, ak)
&nbsp; &nbsp; &nbsp; &nbsp; p1 = p1 - pt
&nbsp; &nbsp; &nbsp; endif
&nbsp; &nbsp; &nbsp; pt = 0.5d0 * pt
&nbsp; &nbsp; &nbsp; if (pt .ge. 1.d0) then
&nbsp; &nbsp; &nbsp; &nbsp; r = mod (r * r, ak)
&nbsp; &nbsp; &nbsp; &nbsp; goto 110
&nbsp; &nbsp; &nbsp; endif

&nbsp; &nbsp; &nbsp; expm = mod (r, ak)

&nbsp; &nbsp; &nbsp; return
&nbsp; &nbsp; &nbsp; end

Another example

http://www.activemind.com/Mysterious/Topic...e_equation.html

4. You could have just used a dictionary defenition...

5. Feel free to add to the discussion, I believe that&#39;s what forums are for?

6. Nah I prefer to drop a little comment here and there and then walk off again.

7. Should I provide a definition for that?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•