The Computation of _ to 29360000 Decimal Digits

0 downloads 0 Views 795KB Size Report
Apr 21, 2018 - Decimal. Digits. Using Borweins'. Quartically. Convergent. Algorithm .... without error. For this reason, programs that compute the decimal ... decimal digits using an IBM. 7090 in 1961. [15]. Readers interested .... root costs only about seven times as much as a .... digits on the Cray-2), due to the round-off.
NASA-TM-I12062

The

Computation

Using

of _ to 29,360,000

Borweins'

Decimal

Quartically Convergent David H. Bailey April

Digits

Algorithm

21, 1987

RNR-87-002 Abstract In a recent theory

work

of complete

elementary

[6], Borwein elliptic

constants.

gorithm

for l/r,

different

digits

algorithm,

Aerodynamic

Simulation

were

and

made

17 million

digits

paper

performed,

million

was

digits

This paper both results

1980

(January

of statistical

is with

multi-precision of r.

Borweins,

that

test

The

converges

main

Ames

memory

workstation.

Kanada

reported

extending

the algorithms

and techniques

to 7r and

for performing

to compute by using

quadratically

to r.

by the

Center.

a

These

Numerical

The calcula-

of r was due to Kanada

computed

Gosper

approximately

[9] reported

described

the

of r

computation

16

computing

the computation

analyses

of the computed

the

NAS

Systems

Subject

Classification:

used

the required decimal

Division

11-04,

62-04.

in the author's

multi-precision

expansion

at NASA

CA 94035. Mathematics

they

Since

technique,

Research

Late in 1985

a Symbolics

al-

was checked

operated

expansion

In 1983

to

convergent

of the Cray-2.

of the decimal

of Tokyo.

result

on the

approximations

quartically

of the Cray-2

at NASA

computer.

has

convergent

based

in this

to over

134

1987).

describes

for converging

The author Field,

using

of algorithms

transform

computation S-810

very rapidly

expansion

Program

University

on a Hitachi

a class Borweins'

by the very large

the largest

[12] of the

digits

yield

as a system

(NAS)

derived

implemented

modulus

performed

possible

recently

Tamura

million

that has

also due to the

were

Until

a prime

Borwein

of the decimal

computations tions

integrals

The author

using

over 29,360,000

and

Ames

computation,

arithmetic.

The

are also included.

Research

Center,

Moffett

1.

Introduction The computation

for a variety decimal

of the numerical

of reasons,

places

is sufficient

for doubl-_-precision constants

both

"practical"

computation.

computations

However,

the

computation

that

practicality,

the

immediate

mathematicians,

who have still not been

in the expansion

of lr are "random".

expansions the

of _r, e,

property

frequency

that

v/2,

the limiting

of any

n-long

instance,

be the

assertion

has not been

performing

statistical

is any irregularity In recent standard

years,

test

the

result

the

other

correct,

hand, then

reason,

2.

is 10 -".

programs

Thus

expansions

there

of these of _" has

one error

occurs

of the

compute

and

purchasers

serious

attempt

the

decimal

the limiting

property

could,

for this

interest

in

to see if there

assumed

the

correct

error. used

to certify

system

for the

constant

as a then

section.

decimal

without

of 7r are frequently

equipment

role

computation,

100,000

of operations

expansion

of new computer

that

numbers

in the

of Ir to even

billions

all have

Unfortunately,

in error after an initial

computation

the decimal

is false.

expansion

has performed

to

the digits

is a continuing

of the

result

that

generator.

If even

computer

and

a guaranteed

integrity.

be completely

that

of 100

of interest

constants

is one tenth,

number

this assertion

suspected

case

about

of whether

mathematical

Such

pseudo-random

suggest

certainly

if the

the

manufacturers

of digits

difFiculties

than

of lr has been

it is widely

is a need

a single

of lr to more

the question

of related digit

numerical

of even

computation

of computer

will almost

a host

on the decimal

would

the

expansion

able to resolve

there

to 10

7r and other elementary

severe

is not aware

in even one instance.

analyses

involving

the value

decimal

of any

string

that

requires

frequency

basis of a reliable proven

author

for centuries

a value of _" correct

Occasionally

for unusually

In particular,

_/_-_, and

7r has been pursued

Certainly

applications.

in order to compensate

a "practical" scientific decimal places. Beyond

for most

and theoretical.

or even multi-precision

and functions

in an extended

value of the constant

practical

On

places

is

For this by both

reliability.

History The first

by Archimedes, increasing

who approximated

numbers

discovered

of sides.

the arctangent

tan-l(z)

=

discovery

Gregory's = to compute

z--_-+

coupled

3:5

5

infinite

value

the areas of equilateral series have been

used.

z" was made polygons

with

In 1671 Gregory

X7

7 +''" of rapidly

with the identity

16tan-l(1/5) 100 digits

7r by computing

More recently,

led to a number

series

an accurate

series 3:3

This

to calculate

- 4tan-l(1/239) of a'.

convergent

algorithms.

In 1706

Machin

used

In the nearly performed series

=

used

[15].

24tan-1(i/8)

interested

computations variation

of the value of _', even those

of this technique.

For instance,

a

book on the

subject

Algorithms

for lr

very recently

have

techniques.

In

above

approximation With

algorithm

employed

this

More

the elementary follows:

Brent

With

doubles

an IBM

7090

in 1961

to Beckmann's

and

Their

are fundamentally

[14] independently

that

of correct

number

digits increases

of correct

similar

quadratically

b0 = 0, p0 = 2 + v/2.

convergent

algorithm

only linearly

with

iteration and

of

Tamura

digits.

another

for fast

an to a'.

Kanada

decimal

[4] discovered algorithms

than

convergence

additional

digits.

a" to over 16 million

P. B. Borwein with

each

faster discovered

yields quadratic

this new algorithm,

the

in 1983 to compute

functions.

using

a" are'referred

that

Salamin

integrals

the number

for 7r, together

Let a0 = v/2,

discovered

[7] and

on elliptic

J. M. Borwein

algorithm

been

performed.

algorithm

recently,

convergent

1976

approximately

digits

[2].

techniques,

of iterations

algorithm

decimal

of the computation

algorithms

based

all of the previous

the number

+4tan-1(I/239)

of 7r to 100,000

Only

the

some

in the history

New

the

that time, most employed

+ 8tan-1(i/57)

in a computation

Readers

entertaining 3.

have

based on the identity 7r

was

300 years since

by computer,

quadratically

computation

of all

for _" can be stated

as

Iterate

lldg) a_+

1

=

bl,+,

-

Pk+l

=

2 v/_(l + b_) ak + bk p_bk+l(1

+ at,+1)

1 + b_+l Then

pk converges

quadratically

19, 40, 83, 170, 345, 694, should

be noted

iterations

must

2788

decimal

with

more Most

higher

order

this

using

2788

convergent

the above

I+ (I-

correct

iterations digits

algorithm

of the expansion

is not self-correcting algorithm,

of this for numerical

In other

words,

yield

of ,,'. However, errors,

so that

in a computation

each of the ten iterations

3, 8,

must

it all

of ,r to

be performed

of precision. [6] have

algorithms for l/a"

2788

to full precision.

the Borweins

algorithm

=

algorithm

digits

I-(IYk+l

1392, and

be performed

digits than

recently

convergent Iterate

that

to _': successive

discovered

for certain

can be stated

y_,),/4

a general elementary

as follows:

technique constants.

Let a0 = 6 - 4v_

for obtaining Their and

even

quartically Y0 = v/_ -

1.

Then

ah converges

the number

of correct

performed 4.

quartically digits

to at least

of a very

routines

precision

computation

a result,

sharply

rendering

the

result

invalid.

as multi-precision

plemented used.

in a style computer

Center. as

This

is conducive

words

No attempt the Cray-2.

Thus,

the vector

performed

to test

and the

operating

because

operations

would Fortran were

vector

compiler.

inserted

operations faster using

processing. For those

to force scalar

registers

or library

of the radix),

computation.

high

is represented

numbers.

level

the computer

care was taken

in

in a style that by the Cray-2

compiler all

directives arithmetic

is approximately

of vectorization

in of

virtually

to use assembly

zero).

numbers 9000000,

The second

that

language,

Indeed,

the

computations the

was

20 times achieved

non-standard

as an (n + 2)-long

sign of the number,

cell of the array

n cells contain

is 107 . Thus

the number

contains

the mantissa. 1.23456789

the

The radix is represented

array

either

1,

exponent selected by the

0, 0,. •., 0.

representation

of numerical

in these

The first cell contains

and the remaining

array 1,0, 1, 2345678, A floating-point

of the

units

was taken

vectorized

vectorized,

Because

22s =

all data for these

advantage

effort,

which on the Cray-2

it was not necessary

which holds

were implemented

of this

hardware,

processing

Considerable

algorithms

Research

is particularly

performed,

full

mode,

for an exact

for the multi-precision

the hardware

were being

being

ease of programming

central

in vector

number

whole

-1, or 0 (reserved

memory,

Most key loops were automatically As a result

Cray-2

key

be im-

Ames

Cray-2

insuring

However,

of the system.

for such

subroutines.

A multi-precision of floating-point

of the

as

occur,

algorithms

this huge capacity,

few that were not automatically

compiler,

these

The

one of the four

to multi-

error would

at the NASA

system.

processors.

of high-

on the computer

the integrity

With

is a set

algorithms

that

Cray-2

these calculations

vectorization.

mode.

Fortran

constructs,

(powers

time

advanced

main memory,

more than

on the other

and vector

were performed

than the

to employ

within

to insure that the multi-precision

admit

be

time and would,

hardware

of its very large main

entirely

at the same jobs

must

A naive approach

computation

is the

(one word is 64 bits of data).

other

programming

for high-speed

sort

of processing

it is imperative

was

was made

was executing

arithmetic.

compiler

computations can be contained and fast execution.

of this

amount

to employing

computations

for this computation

268,435,456

case, each iteration

that an undetected

multiplication,

used for these Fortran

computation

a prohibitive

In addition

computation

well as the

well suited

that

quadruples

for the final result.

multi-precision

require

the probability

operations

The

precision

for performing

increase

desired

approximately

Techniques high

would

iteration

As in the previous

of precision

Arithmetic

element

performance

in the result.

the level

Multi-Precision A key

to 1/_r: each successive

was chosen

supercomputers Cray-2

instead

of an integer

such as the Cray-2

does not even

4

have full-word

representation

is designed integer

because

for floating-point multiply

or divide

hardware

instructions.

to floating-point fixed-point

Such

form,

(integer)

using

form.

multiplications

and

on the

(in vector

radix

Cray-2

107 was

the exact

product

using

Multi-precision

division,

perform

and

addition conducive

because beginning it cannot

subtraction.

releasing

the

Thus

it is necessary

are not successful

"schoolboy"

tion,

and

Yk+_

square

converge yields

about

these

twice

operations

that

is not

done

followed

until

three

procedure

root

may be performed

This

working

is

forward

by starting

at the

Unfortunately,

will release

all carries

(con-

by a number

exceeding

107).

all carries

cases where

to

imme-

for the final result.

of this process

9999999's,

multiplication

Let

have

been

released

applications

(usually

of this vectorized

program

resorts

to the scalar

extraction

z0 and

quotient

algorithms

cost

a multi-precision multi-precision

and

economically

approximations

of a, respectively.

quadratically the

arithmetic,

tiplication,

Y0 be initial

root

is available,

multi-precision

using

Newton's

itera-

to the reciprocal

of a and

to the

Then

2 to the and is that

desired

of the

the first

each

final

iteration,

division

costs

multiplication.

time.

iteration

may the

the

about

square

additional

be performed

total

one costs

is especially using using

of computation

additional

multiplication.

as much

only

about

multipliattractive

ordinary

single-

a level of precision

cost

five times

root

full-precision

What

may be performed

Thus

plus

only

One

root, respectively.

iterations

doubles

a multi-precision

values.

the square

and subsequent

approximately the

suffice

for each cell processed.

multi-precision

--

cation

that

compared

at the last cell and

the author's

of the square

precision

of the

to obtain

expensive

this is better

only one cell back

in releasing

will fit in half

be multiplied

algorithms

carries

all carries,

a fast

as follows.

reciprocal

both

of these the

of beginning

this operation

was chosen.

simple

Thus

supercomputer

In the rare

to a binary

radix

method.

Provided division

extraction.

one application

times).

may

normal

arithmetic.

only part

consecutive

to repeat

one or two additional process

that

case of two or more

of ten tkat

numbers

to

because

than

preferable

a decimal

back

value

any faster

is clearly

output,

operands

results

of a binary

performed

power

is releasing

approach

the carry

be guaranteed

sider

The

On a vector

instead

the

the

are not computationally

root

processing

"schoolboy"

operation.

and

square

converting

converting

radix and

it is the largest

and subtraction

to vector

the normal

is a recursive

a decimal

single-precision

and

and

was chosen

In this way two of these

addition

to multiplication,

unit,

and for input

ordinary

by first

of two are not

Since

because

word.

performed

radix

by powers

mode).

chosen

of a single

diately

A decimal

troubleshooting

mantissa

are

the floating-point

divisions

for program

The value

operations

is only

about

As a result,

as a multi-precision

mul-

seven

as a

times

as much

5. Multi-Precision

Multiplication

It cxn be seen precision than

arithmetic

about

although

Above

algorithms suffice fact

above

some

be

taken

this

level

advantage.

to note

that

z = (Zo, zl, z2,.-.

Let

,zN_l),

and

operation. of the

of precision, here. F(z)

of x high-performance

For modest

usual

to insure

however,

other

let F-t(z)

denote

is sufficient, operations

sophisticated

techniques

the discrete

the

(fewer

the inverse

from

transform

discrete

multiply

to Knuth

derive

Fourier

are

techniques

of high-performance

reader is referred

state-of-the-art

denote

multi-

of precision

method that

more

of the development

The interested

levels

"schoolboy"

implementation

The history

all of the current

analysis:

the key component

variation in the

will not be reviewed

of Fourier

that

is the multiply

digits),

must

a significant

the

system

1000 care

vectorizable. have

from

[13]. It will the following

of the

Fourier

sequence

transform

of

N-1

F (x) = Z 3=0

1 N-_ Fk-l(x)

=

_

_ XjCO -jk j---O

where w = e-2'_i/Nisa primitiveN-th root of unity.Let C(z, y) denote the convolution of the sequences x and y: N-I

j=O

where

the

subscript

"convolution

theorem",

F[C(x,y)] or expressed

and exponent

=

=

result

proof

is a straightforward

exercise,

states

Then

the

way.

Let

that

way F-I[F(_)F(y)]

is applicable

y be n-long words).

whose

as k - j + N if k - j is negative.

F(_)F(y)

another

C(x,y) This

k - j is to be interpreted

to multi-precision

representations Extend

Then the multi-precision written as follows:

x and product

of two y to length

multiplication multi-precision

numbers

2n by appending

z of x and

6

y, except

in the n zeroes

for releasing

following (without at the the

the end

carries,

sign

or

of each. can

be

zo

----

ZOy 0

zl

=

ZoYl

z_

=

Zo92 + ZlYl+z=9o

--

zoyn-1

zn-1

+

Zlyn-2

Z2r__

3

_

Xp.._l_n_

2 +

Z2rt_

2

_

Zn_llJn_

1

.Z2n_

1

---'--

0

It can of the the

+ ZlYo

now

two

be seen

sequences

multiplication

transforms, N = 2n.

The

"multiplication N

=

pyramid" 2r_.

multiplication,

complex

The

savings

computed

convolution

and

numbers

of literature

two

one reverse

have been

rounded

some

variation

to employ

Fourier

of the

"fast

implement

theorem

states

discrete

transform,

each

the

transform

are

transforms.

purely

real.

Note

This fact

performing

real-to-complex

only

half the

about One

used, a large

important

then

the

number

the input

data vectors

can be exploited

by using

and complex-to-real

work item

that

otherwise has

been

product

of two

of these

products

transform"

a simple

since there

(see

[1], [8], and

omitted

from

the

above

cannot

be represented

to work

two words

simplest

solution

The with

only three

procedure that

([8],

obtains

discussion.

cells will be in the neighborhood

the complex slightly.

ra. requirement vector

p.

169)

the

result

If the

radix

z for

with

required.

In this case the rounding to recover the exact whole

method

(FFT)

transform

algorithm

the

may of course

z and 9 and the result

transforms

a Cray-2 floating-point word. the transform will not be able transform

of length

as described

[16]). Thus it will be assumed from this point that N = 2" for some integer One useful "trick" can be employed to further reduce the computational for complex

that Fourier

integer,

carries

Fourier

this

convolution

forward

the radix two fast Fourier

on how to efficiently

the

to the nearest

releasing

here is that the discrete

using

convenient

is precisely

by performing

product may be obtained by merely on addition and subtraction.

It is most

is a wealth

Zn-19o

be obtained

complex

key computational

algorithm.

+

9, where can

the resulting

be economically

this

z and

pyramid

final multi-precision in the section above

""

Xn--2_/n-1

that

one vector Once

+

correctly,

is to use

digits each.

the

Although

exactly

107 is sum

of

mantissa

of of for

l0 s and

this scheme

in the 48-bit

the

operation at the completion number result. As a result,

it is necessary

radix

of 1014 , and

to alter

to divide greatly

the

above

all input

increases

scheme

data

into

the memory

space required, computation 6.

it does permit up to several

Prime

Modulus

Some However, million input

of the

computer

it appears digits

data

but only with

digits

above

due to the into

increase

in this computation was to remain different method was used. of a fast exists

Fourier

be seen

a primitive

modulo

that

transform N-th

p, where

been

including

divided

a substantial

has

used

to be used for multi-precision

in almost

the program

used

down for very high precision

Cray-2),

be further

It can readily

method

on the Cray-2.

method

programs,

to break

on the

can

million

transform

Transforms

variation

multi-precision

the complex

round-off

by Kanada

per

problem word

and

or even

one

digit

Since

memory,

algorithm,

the

of the

Cray-2

can be applied

root of unity

_.

form

section,

p = kN

holds

ten The

per

word,

a principal

goal

a somewhat

including

in any number

This requirement

of the

main

previous

about above.

in run time and main memory. within

Tamura.

(beyond

mentioned

totally

the technique

p is a prime

high-performance

computation

error

two digits

all

the usage

field in which

there

for the field of the integers

+ 1 ([tl],

p.

85).

One

significant

advantage of using a prime modulus field instead of the field of complex numbers is that there is no need to worry about round-off error in the results, since all computations are exact. However, operations second hard

there

are

above.

some

The first

difficulties

is to find a primitive using

compute

a computer

Euclidean needs

algorithm

A more about

quadruple Fourier

inverse one time

troublesome

multiplication

1024 then

precision

to the problem

to perform

the transform be applied

in using results

p.

field for the transform + 1, where

As it turns

by direct

theory.

Note

N = 2"_. The

out,

search.

it is not too

Thirdly,

p. This can be done using that each

a prime

but the

very

one must

a variation

of these

above

of the

calculations

of such

increase

the

p.

a large in the

prime inner

run time.

using

each

prime.

Then

would loop

greater

fast

and faster 10 lz, and remainder

product

P_P2. Since

pyramid the fast

numbers. Unfortunately, double precision arithmetic must still be performed in Fourier transform and in the Chinese remainder theorem calculation. However, number

to program

them

Borodin

and

primes

Pl,P_,

and

format

of the

in a vectorizable Munro

({3], p.

P3, each

than

input

1024, these

data

results

simplifies

the results

require

of the

than

the Chinese

that than

may

pip2 is greater

Pl and p2 to obtain

fact

A simpler

pl and P2, each slightly

modulo

is the

If p is greater

theorem

the whole

results

usage

transform

modulo

to be performed

greatly

is to use two primes, algorithm

modulus

are only recovered

operations

would

to the

modulo

numbers

number

a problem,

arithmetic

of unity

of these

modulus

form kN

only.

difficulty

which

a prime

p of the

of N modulo

pyramid

this is not

transform,

approach

root

from elementary

to be performed

the final

N-th

to find both

the multiplicative

in using

is to find a prime

will be the exact

these

operations,

using

three

modulo

the

multiplication

and

it is possible

fashion. 90)

of which

have

suggested

is just

smaller

than

half

transforms

of the

mantissa,

with

three

and using

the Chinese precision

remainder

operations

quite

fast,

using

this system

million

avoided

the largest

is N = 219, which

interested

in studying

or the Chinese

theory,

such

on using

results

modulo

PlP2P3.

In this way double

in the inner loop of the FFT.

transform

that

corresponds

tools

This scheme

can be performed

to a maximum

on the

precision

runs

Cray-2

of about

three

remainder

The author

has implemented

the

followed

approximately of processing words

the

several

for 7r. This

memory.

A comparison

run

mode.

would

otherwise

took

computed

decimal

Statistical Probably

historically of its decimal

been

were

entire

down

was

40 hours

results

truncation

error.

final result

are correct.

both

computations

were

was

inadvertently

of these

required.

This error,

and

matter

since

complete used

however,

run took

quadratically 147 million

was

in scalar

two

key

iteration. convergent

words

of main

no discrepancies assumed

mode

25% more

did not affect

taken

programs.

that one loop in the about

used

completed

the

of each

com-

and

by other

first run found

performed

calculations

The

Thus it can be safely

of the

both

and

the

In this

system

the completion

time

with

algorithm

units

7, 1986 - the

interrupted

of Borweins'

processing

output

of a'.

processing

a simple

on disk after

of _r.

performed.

time

scheme

quartic

digits

on January

this

two-prime

that

Chinese

instead

run time

the validity

of than

of the

expansions.

Analysis the most and

started

using 24 iterations

a normal

computation

As a result, have

It was

the

trans-

is significantly

computations

29,360,128 central

multi-

[1], the complex

scheme

of Borweins'

operations

not running

were saved

of these

after

theorem

vector

information

than the two-prime

for the

iterations

to yield

after a system

digits

It was discovered remainder

al-

on number

for multi-precision

faster

and the run was frequently

arrays

for the last 24 digits, 29,360,000

was

was checked

algorithm

at least

text

techniques

and since

it was selected

arithmetic

memory.

computation

This computation

scheme,

on one of the four Cray-2

times,

number

complex

operation,

The program

down for service Restarting

the Euclidean

excellent

of the two-prime

used twelve

12 trillion time

techniques

about four times

computation,

of main

9, 1986.

multi-precision

fields,

to any elementary

high-performance

requirement

or the

by a reciprocal

28 hours

138 million

number

[3] also provide

of the above

special

computations

putation

January

Borodin

all three

three-prime

of the author's

for 1/_r,

[13] and

the memory

very high-precision

One

are referred

to run the fastest,

However,

either

permits

theorem

By employing

can be made

less than

modulus

Results

on the Cray-2.

form method.

prime

for computation.

Computational

transform

about

as [10] or [11]. Knuth

these

plication

8.

the

digits.

gorithm,

except

to recover

are completely

but unfortunately

Readers

7.

theorem

of _" significant

in modern expansion.

times, Before

mathematical has

been

Lambert

motivation to investigate proved

9

in 1766

for the computation the question that

of the

lr is irrational,

of _r, both randomness there

was

Count

Digit 0

interest

disclosing the

2935072

-0.5709

1

2936516

516

0.3174

2

2936843

843

0.5186

3

2935205

-795

-0.4891

4

2938787

2787

1.7145

5

2936197

197

0.1212

6

2935504

-496

-0.3051

7

2934083

-1917

-1.1793

8

2935698

-302

-0.1858

9

2936095

95

0.0584

course

in checking

that

still

strongly

suspected

will pass

mentioned

conjecture

frequency

of 10 -n.

With

29,360,000

for n as high statistical strings

digits,

from

The most

that level

divided

appropriate XI,X2,""

,X_

-

a continuing

of n-long

table

zero and

procedure

of digits is defined

interest

random.

in

It is of

to sufficiently The

most

high

frequently

may be studied

for randomness

of any one string frequencies

the z-score

is too low for

for one and two digit

numbers

deviation, variance

for testing

are random

thus

with a limiting

number

of tabulated

repeats,

of n digits occurs

strings

the expected

mean

been

is statistically

for randomness.

by the standard

with

statistical strings

has

any sequence

The results

distributed

eventually

of a', if computed

test

1 and 2. In the first

the mean

of n-long

observations

expansion

statistical

expansion

there

the decimal

the frequencies

in Tables

time

this line is that

Beyond

be normally

that

the expansion

to be meaningful.

are listed

frequencies

that

Statistics

of whether

reasonable

along

as six.

tests

the deviation should

any

Digit

or not its decimal

Since

question

precision,

1: Single

whether

a" is rational.

unanswered

Z-score

-928

Table

great

Deviation

are computed

and thus these

as

statistics

one.

the hypothesis

is the

X 2 test.

variable

Xi.

that the empirical

The X _ statistic

of the

k

as

2

i=l

where

Ei is the

expected

value

of the

Ei = 10-nd

for all i, where

X 2 statistic

in this case is k - 1 and

nearly

normal

Another

for large test

that

sis to check whether

random

d = 29,360,000

k. The

the number

its standard

results

is frequently

denotes

of the

performed of n-long

In this

the number

deviation X z analysis

of digits.

is v/_k are shown

on long pseudorandom repeats 10

for various

case

-

k = 10 '_ and

The

mean

of the

1). Its distribution in Table sequences

n is within

3. is an analy-

statistical

bounds

is

O0 05 lO 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95

293062 Ol 294189 06 294503 iI 293158 16 293952 21 293721 26 293718 31 29349O 36 294622 41 293998 46 292736 51 294194 56 293842 61 293544 66 292650 71 293199 76 292517 81 293600 86 293470 91 293104 96

293970

02

293533

03

292893

04

294459

292688

07

292707

08

294260

09

293311

293409

12

293591

13

294285

14

294020

293799

17

293020

18

293262

19

293469

293226

22

293844

23

293382

24

293869 293905

293655

27

293969

28

293320

29

293542

32

293272

33

293422

34

293178

293484

37

292694

38

294152

39

294253

294793

42

293863

43

293041

44

293519

294418

47

293616

48

293296

49

293621

293215

54

293569

294272

52

293614

53

293260

57

294152

58

293137

59

294048

293105

62

294187

63

293809

64

293463

293123

67

293307

68

293602

69

293522

294304

72

293497

73

293761

74

293960

293597

77

292745

78

293223

79

293147

292986

82

293637

83

294475

84

294267 293025

293786

87

293971

88

293434

89

292908

92

293806

93

292922

94

294483

293694

97

293902

98

294012

99

293794

Frequency

Counts

Table

2: Two

Length

Table

Digit

X_ value 4.869696

Z-score -0.9735

84.52604

-1.0286

983.9108

-0.3376

10147.258

1.0484

100257.92

0.5790

I000827.7

0.5860

3: Multiple

Digit

ll

y_ Statistics

Length 10

Count 42945

Expected 43100.

11

4385

4310.

1.033

12

447

431.

0.697

13

48

43.1

0.675

14

6

4.31

O.736

15

1

0.43

0.784

Table 4: Long Repeat

of randomness.

An n-long

at two different

positions

n-long

repeats

repeat

is said

is the same.

in d digits

Statistics

to occur

The mean

are (to an excellent

Z-score -0.677

if the

n-long

M and

digit

sequence

the variance

beginning

V of the number

of

approximation)

10-nd 2 M

-

V

-

2 11-lO-"d 18

Tabulation ning

of repeats

at each

equal 4.

position

contiguous

A third compares occurrences

The

observed would

frequencies

of any note

is a 29% chance by itself

sorting

the resulting

results

runs are

except

The that

expaasion

of a'.

all within

acceptable

limits

of some

would

run

This

tests

of such

Table 5 lists

of randomness.

occur

in Table

of this statistic

by 2d.

of a 9-long

digit

begin-

counting

number

and variance

calculated

run

with the

d 2 is replaced

5 is the occurrence

a 9-long

and

are shown

is the runs test.

digit

mean

the string

array,

of this analysis

runs of a single

at random.

for repeats,

in table

that

The

of long

be expected

of long

word,

list.

by packing

as a test for randomness

of runs for the

frequencies

this instance 9.

frequency

of a" was performed

Cray-2

performed

as the formulas

phenomenon there

a single

in the sorted

frequently

that

are the same

in the expansion

into

entries

test the

observed

2

of sevens.

in 29,360,000

The

the

only

However, digits,

so

is not remarkable.

Conclusion The statistical

decimal

places

strings

of digits

strings

and

decimal

analyses have

have

disclosed

been

any

runs

of _r appears

are

performed

irregularity.

for n up to 6 are entirely

single-digit

expansion

not

that

on the expansion The

unremarkable.

completely

acceptable.

to be completely

12

random.

observed The Thus

of _" to 29,360,000 frequencies

numbers based

of n-long

of long repeating on these

tests

the

Length of Run 5 6 7 8[9 Digit o 308 29 3 0 0 1 281 21 1 0 0 2 272 23 O 0 0 3 266 26 5 0 0 4 296 40 6 1 0 5 292 30 4 0 0 6 316 33 3 0 0 7 315 37 6 2 1 8 295 36 3 0 0 9 306 40 7 0 0 Table 5: Single-Digit

Run

Counts

REFERENCES i. Bailey,D. H., "A High-Performance Fast Fourier Transform Algorithm forthe Cray2", to appear 2. Beckmann, A.,

Problems,

Munro,

J. M.,

Computation 5. Borwein,

7. Brent,

Elsevier

and

J. M., and

Borwein,

R. P., "Fast

E. O.,

Borwein,

"The

of Algebraic

York,

Review,

and

pp. 351-366.

Converging

Algorithms

- A Study

in Analytic

W.,

10. Grosswald,

private Emil,

New York,

of Elementary

23 (1976),

1987. Functions",

Journal

pp. 242-251.

Prentice-Hall,

Englewood

Cliffs,

communication.

Topics

from

the

Theory 13

for

Number

1974. 9. Gosper,

Fast

pp. 247-253.

Evaluation

Transform,

Mean

26 (1984),

John Wiley,

Machinery,

and Numeric

1975.

Quadratically

46 (1986),

P. B., Pi and the AGM

Fast Fourier

1971.

Arithmetic-Geometric

SIAM

Complexity,

CO,

Complexity

P. B., "More

of Computing Tile

Boulder,

Co., New

Functions",

Multiple-Precislon

of tile Association 8. Brigham,

P. B.,

of Computation,

Computational

Press,

Publishing

J. M., and Borwein, and

1987.

Computational

of Elementary

Mathematics

6. Borwein,

of Pi, Golem

I., The

American

4. Borwein,

Theory

of Supercomputing,

P., A History

3. Borodin,

Pi",

in Journal

of Numbers,

Macmillan,

NY,

1966.

N J,

11. Hardy, edition, 12. Kanada,

G. H., and Oxford

Wright,

Y., and

tre, University D.,

The

Art of Computer MA,

o/" Computation, 16. Swarztrauber, 1 (1984), pp.

Theory

of lr to 10,013,395

Gauss

Arctangent

Programming,

of Numbers,

5th

Decimal

Relation",

Places Computer

Based Cen-

pp.

P. N., "FFT 45-64.

pp.

2: Seminumerical

Arithmetic-Geometric

Algorithms,

Mean",

Mathematics

Decimals",

Mathematics

565-570.

J. W., "Calculation

16 (1962),

Vol.

1981.

of 7r Using

30 (1976), Wrench,

and

to the

1984.

1983.

E., "Computation

D., and

London,

"Calculation

Algorithm

Reading,

of Computation, 15. Shanks,

Y.,

of Tokyo,

Addison-Wesley, 14. Salamin,

Press,

Tamura,

on the Gauss-Legendre

13. Knuth,

E., M., An Introduction

University

of _r to 100,000

76-99.

Algorithms

for Vector

14

Computers",

Parallel

Computing,

APPENDIX Selected

Inititl

1000

Output

Listing

di6itJ:

3. _4_926_3_89_932384626433_3279_2884_9_6939937_82_974944_923_8164_62_62_8998628_3482_342_7_679 82148_86_32823_647_938446_9_6_8223172_3_94_8128481_1_4_2841_27_938_211_696446229489_493_38_96 442881_97_66_93344612847_64823378_78316_2712_19_914_648__692346_348_1_4_43266482_33936_726_249141273 724_87__6__631__88174881_2_92_9628292_4_9171_3643_7892_9_36__1133__3__4882_466_2138414_9_1941_116_94 33_S727_3e_7_9_9_9_3_921_61173_1932611793___118_4__744623799e2T49_673_188_7S2724891227938183_1194912 98336733e244___6_43_86_2139494e39_22473719_7_21798__9437_2_7__392___762931767_2384_748184676694__132 ____6812714_263_6_82778_7713427877896_9173_3717872146844_9_12249_343_146_49_8_371___7922796892_8923_ 42_199_6112129_219__864_344181_9813e297747713_99___187_7211349999998372978_499_1__9731_32816_96318_9 __244_94__3469_83_2642_223_82_334468__3_261931188171_1___31378387_2886_8__332_838142_6_71776691473_3 _982_349_42_7__4687311_9_628638823_3787_937_19_77818_7_8__321712268___13___9278_661119_9_921642__989

Digits

4,999,001

to

S,O00,O¢Ot

4948_7_4784__81__182T319316324884128_44887222969s6798___1_4648__78_48_736_3_2279_2_36997918_848_7_3_ 649_2221__A_27_8_7_833__3_212_696848_1817137_1_32997__173842_16_34_4_2_3_1_____3_1_4_342162492_27179 6682492e4_893_96_18264__2_9231_2266_7__4_6414__3472_341__491377_421___7644_28__8_9_3_248393621_93_31 _2288_9_2384868TT92314s24_84163727118_9_3__889__4_68843766781431498914299893621278_4_2__14314_439_48 499388_1__633___9_1311673_89113276_77788136469_7_847_3686341119_323_6388___748_8_212_6828422_78_2_24 _3_869937_32__692_9396_818_8741418123_4841_32_4_492_234989__2732447_93_2_32379479_T764447_239844__14 _73_44_321_96898_2449619_714343396489__93_9___2338498188_274684492483_314_342____6421_3__286868_8_48 274_33186_992_73473_64273__36364__28_6_222189663__11429182_343199_41632_3372368798_S34_11112_3___262 391_4_8263997_934__8146672_2138_1__913_4721___242818988626_331694693319_167_2962_93_67_2291_9_71_999 _984_1792_8__9262___848638_3881128_944___488_21_6_488__8__191846T_23__4217617_3____8172132_764_19_1_

Digits

9,999,001

to

10,000,000:

___97818243_16728227_49g1_72_4__2867_79_7__446_33_1271_2_297952__8_61772_334_06894988__64247_326923_ 1_39982_9__39_16e27_2243381844248_8__939_2936_2_82_363$6_8_8417E48__3_7448186__28924_1882_6447__328_ 79_29_4_6_2929_83_8348_48393_833346_1_19_89_2_6_14_369_7314_9_946_82346_47872_289_299742_4 _2_27_3$23_9232933_77_17942386_22_9_324_694_2748_6_41288_3_3_924s248_3494_8273_932443887273_9397 4_634_9_469_1924_39_1_1341_434339983_18746_97233692_3_22_7914_24_42444_132_3129643963912_96_78_ 1_344_5119912_42_8_97374_7446_4_89974214S731_42313644_486_19378_63S266_3744_S_882386138937_443 973_168129_831_679116188842222_1_41477322612331396186_6_8_37311_348_9266_93394_4384163__32614344928_ 5_82_131_7_737727739821_1_22286_9997_62432_872_39339344_9_2_916622729_S4934938271782_126669_21149 4719231138_933822311224_99588372246332_122232337_9689_269_253662639412_7_1_3_732_864987_7_2_7149617 76_1_492s798_7_92_4_32468944687427_2_463979_6_326_3194_6_9994697873338_63_71948_73_3489_897

Digits

14,999,001

to

16,000,000:

7_161912_82729_344371232797492__311_1192_2439_69__4146673__6919481_163837226_7392_1_1__77_17_1__9`r4_ __6228__72_4486_22_94__93_4_4488_39_829811_8_124923__26_8837_966783621_497_3412_39_83_84922711342__3 949_399__9362_4413314_173_133_8__4817231_88747322_668621392_1938S4_1_224947__7_4949471_839_623__278_ _7_338__82449___1_844623__4724_7_1216_9_27_43862_283__99923_222328486_934_66262929748436_2773__12_3_ 14434_936_98742_976_41§$_4412_97984133998_1_934_843_39347_6___243238__16_4327319_8___1264__671_713_3 77_7_6214_7_9318131_1162879_971_179_1_2818_9_93_4481_8_447_73641221661_3242_982631662_7 4173__1822_48_71_488224616_6389_344_469342_81_3238399_32_4_2988_746342496$83_868369474861942_7_33_4_ 36331223_38222392494___27_8_6378_33___213_44686_93_29868217149_28_8_8_949418676_32291__73398_7684___ 77_761_178___7277_9988__2737_81438_794117668763_997_814499149_9_314_94_98_2_96_33_377989988228138_79 _39_46_8_7618_7_488_4339_84_19_41_927_26_34467964_2_263473393286_74979323931_31411727756698_3

Digits

19,999,001

to

20,000,000:

2466242_2_998594888_8_44_687_1975764389516_7697867s8_2652844s12412624999551s_446_281646_92893_6 37396198_96248_2711___2469686381679_79_9892616_2141998_14_3927165461_87146642_799_2787__23943144_69_

15

24S 2482788300143S83049929S 9816988969940t

$40s76

1SS 66S 1943780¢24S22316130349846016S13S

282 $3410971:8187S080414$718_219S0

|e0430489s4"r131781464794920sse9961179989"/'1293_7_s31s_s_38s3s81sg3SS_l_8

e=00848622"ro298esee82308se391322oelss920s243349223418984_?N210s2e_e22_287ee49s1|_N2024 242"r

5201300462306788083890012"rs40081147s

2788s

23s888942133"r21123400642"r201"r3"r

28097400"r

l_Se

14969136464242229763044348160s110791844_4_2_2_g212978s0 s|4481"r263248s38990s48s693982923700908893"r

143s44264882420"r842|49

27949203s6326388439s3101"r6643s3s9026146347630723302999904s4962_19262921314324891

_8031

2409134088861860323"re704408"rT04719307996s717842s684902689744s7016817_810789_118970643044s720474936 819Q38s78160207934661666449313sgo'r300s891342768"rssgs07244789s2328081911162910s

DLELto

24,999,001

to

S_l

2S,000,0QQ:

_4_2_376_S_7884_1_2_8_r2_3S83S1_2S_93238112e8_413224S2T'r?46296_11387113_1768322443714934_11_S_71_3 91_991_83_22_88_388_484?_379998239_e_41879S42473S_36_3S8S_S213_4S168727__8_9e7894__SS8S34_92284428_3 24948936__13422_79_S9e8_4_96?_9211__r19_838___S82_S3_81__481S19_224_8S___2148_.74123SS1_23S29_8_81__92 ?4189214723_862_36_212171399_138S141_7_793749_2S32_43S_78S9972884134839114349S221986494832133_49_?4 6_14_43_1212_43112S9S?394?3_1142S31184___914224_8_72_1221_3__3318_2S__17932?1_81____92499_9_3813?333 _9e_2S?_213348431S489S3618884362_873_2748886T4?81183?39847393137S_?_.r1492_9_114_221961S798_47_6?S14 3_98133_283_419_9?_9_9_144_472922_212937_24_47_7_9_4744S_1_8_2?2319698_3S17_24941726_18_383_7 327e2891?418_38221492_8_3922_37_3829_?3_941T39_39_?649_8886_8491e818e491743.r_r_2?82872e191_923 924?_738836_872266493_962438329_8614_437_22828828173_9_312_42_743?_e119_8_12973_3_342_37?.93_2761 38_3?__?9_9491__31_82381_8922e722417_329__4_2_3446_78e411_924_9?8__94424$_1128_22__4_7.r483_191__4322

DLgits

29,369,001

to

29,360,000:

34_928417889_229_43368473881977_98_3_746219846_9_2_347_`r.r_172988_433_243_26184_9_r2_919_2S91_7 _11_?47_294_?3_3_74_S23S_2782978?_2_S44_?S4_S_`t39989S_71S3_981_2189_1131_S_419_973_9?2_29_6_6? 1889_11_1382_842S8998_21_44_3_S?_3_937_2898823_7_141234?48_72_`ie93S_3_73_./._r738_64_43?3_8_?329184_ 621_849_33_9748276894112_8_7_2229_/._2323_6239_6833_263114891e_e388391_7_19?3_9t4991_19284_8941_1_9_ 3961226_3293_119_97872S_7642_46289S37_18_9_`r4494_3_3_92921314127_4_888_1_17_422_84_84744149319_18 _?6_82_?21.r.r28361449_r_r9?_76_228_4_1K)47197_9_2_4?_68_36_a422_89_17?3`r13_11$9_4_2433_16212 37_9374_?_2_7_33898894_12337_693_1_S72_9_3_27814_91_1913_3_7_746432_18_38_4_T13_997$_?_4S_9e83SS4 __9___7_?_2849747S12_4_78644113_84S32_32314_4__419172_33_48996479_2_3287817189338?317819324912382342 18_4_2717e3T23_22_@1?2_1_34_3_8_849S_8_81_1124899_44_84872_e93_219_T79.r94342949464_2_841993sK)_9_3_ 342_98_232?7623931436_2_9_7_832_2_37_2_924?768147_49_971424493_?_41433_9872_9_78_e_43222?28882_3

16

M_9_M34S27644

_84