[about me] [powered by lisp] [... Viewable With Any Browser ...] [written with vi]

This page discusses pi, but is really about anthropocentrism.
 

table of contents

an earlier controversy: geocentrism
alive and well: anthropocentrism
math isn't hard
bases 2 to 36
generating all these digits: part 1
bases 37 to 1000
generating all these digits: part 2
the constellation of data
finding words in pi

This is a table.

an earlier controversy: geocentrism

Geocentrism, a model of the universe in which the earth is at the center and everything moves around it, was for a long time considered to be accurate by Christians, Muslims, and Jews alike. After some conflict, there's little, if any, religous support for this idea.

Support was based on scriptural texts, but I suspect that geocentrism also filled a deep-seated need for humans to feel special. Though geocentrism is gone, the need still seems to be alive and filled through another approach: anthropocentrism.

alive and well: anthropocentrism

Anthropocentrism, also known as human exceptionalism, considers humanity as being the pinnacle of the universe. Anthropocentrism (as well as geocentrism) is best illustrated by this riddle:

How many tenors does it take to screw in a light bulb?

One. But actually, he just stands there and the universe revolves around him.

From the anthropocentric viewpoient, we are all tenors. Anthropocentrism is embedded in our culture so deeply that most of us aren't even aware that we embrace it. Consider, for example, the Christian thesis that God so loved humanity that he became one of us. "One of us" means human; God became part of the created universe, and becoming human was obviously the way to go. There are (at least) two problems raised by anthropocentrism.

One problem is that if we think we're the pinnacle of the universe, we might be tempted to think there's nothing wrong with trashing the environment, from offshore-drilling to rolling coal. Fortunately, not all who embrace anthropomorphism are so careless. Pope Francis, for example, in whom I have seen no signs of shunning anthropocentrism, says "If we destroy Creation, it will destroy us."

Another problem is that we have no reason to believe that anthropomorphism is realistic. There's no real basis for the idea that we're the pinnacle of the universe. There are signs here and there in our culture of a more enlightened view. The motion picture Star Trek IV, for example, portrays whales as another intelligent species. And Douglas Adams, in The Hitchhiker's Guide to the Galaxy, says:

For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons.

postanthropomorphic Holy Family And consider this picture of the Holy Family. The only thing missing is the humanity, and yet the picture atracts our gaze for much the same reason that all other pictures of the Holy Family do.

This web page about pi is another example of casting off anthropocentrism. We already know that it's possible to find, on this wonderful World Wide Web of ours, pi calculated to a million places. There's nothing arbitrary about the value of pi itself, of course: it's the ratio of the circumference of a circle to its diameter. But the digits we see are arbitrary, because we're looking at pi in the base 10 number system, the decimal one. That's natural for us, because we have ten fingers.

But the choice of base is arbitrary. What about other bases? Exploring pi expressed in other bases shows how arbitrary our choice of base is; showing pi in hundreds of bases causes our base 10 representation to shrink almost into insigificance; it can be argued that humanity, compared to other (mostly undiscovered) intelligent species, would shrink into insigificance as well. We can use various expressions of pi as a proxy for the possible intelligent species in the universe; that is the point of this web page.

If all this math makes your eyes glaze over, know that you're not alone. The next section will take you through the math. But if you're already familiar with the math, skip the next section and go on to the one following by clicking here.

(Click here to go to the top of the page.)

math isn't hard

What does "base" mean, anyway? When we write numbers, we ordinarily use "base 10"; that is, there are ten digits at our disposal. Here they are:

0123456789

We're already familiar with what we do when we run out of digits: we crank back to 0 and carry 1 to the next place. This sequence is familiar:

007
008
009
010
011

What happens when we carry 1 to the next place, and the next place is already at the highest available digit? We repeat the process for as many places as necessary, cranking back to 0 and carrying 1 to the next place. We repeat this until we reach a place where we're not already at the highest availabile digit (9):

05997
05998
05999
06000
06001
06002

Let's put aside for the moment base 10 (decimal) and consider the next most widely known base: base 2, the binary number notation. Instead of ten available digits, we have only two:

01

That's all the digits we get. When you want to add 1 to a digit, and that digit is already 1, you can't use the digit 2, because that isn't in your alphabet. You have to crank back to 0 and carry 1 to the next place. And if that next place is already 1, you rinse and repeat:

000110
000111
001000
001001
001010
001011

Two more concepts, and we're done with the math tutorial. The first concept is that we're not limited to base 10 and base 2; we can use any base we want as long as it's an integer (a whole number) greater than 1. One awkward point, though, is deciding on an alphabet when the base is greater than 10. The customary solution is to use letters when we go beyond 9. This works just fine for any base less than or equal to base 36. For base 36, we have the following alphabet of digits:

0123456789ABCDEFGHIJKLMNOPQRUSTVYWXYZ

So then another awkward point is deciding on an alphabet when the base is greater than 36. There's no standard solution to this. We'll tackle it below.

One final concept, and we're ready to fly: fractions. Using the decimal number system, we're already familiar with the idea that each of the following numbers is one tenth as large as the number preceding it in this list:

1000
 100
  10
   1
   0.1
   0.01
   0.001

But that same paragraph of digits can also be used in base 6, for example, to show other quantities. Here's a slight expansion of that paragraph; let's use it to show showing numbers in base 6. You'll see to the right how we'd express the same quantities in decimal.

1000       216
 100       36
  10       6
   1       1
   0.1     1/6
   0.2     1/3
   0.3     1/2
   0.4     2/3
   0.5     5/6
   0.6     oops; this isn't valid in base 6; digits go only to 5
   0.01    1/36
   0.001   1/216

Ok, that's all the math you need to know (for this page, anyway).

(Click here to go to the top of the page.)

bases 2 to 36

Ten is the number of fingers and thumbs most humans have, but let's not be soo arbitrary. With a shout-out to any Martians and others who may be reading this, here's a million digits of pi in other bases, ranging from 2 to 36. (I arbitrarily use the decimal number system to describe these bases, because you have to start somewhere.)

When I count a "million digits" (where "million", once again, is arbitrarily used as a decimal number), I count them starting to the right of the radix point (which you may know as the "decimal point", in base 10). That is, I don't count the initial "3" as part of the million digits.

The "alphabet" of digits I use is this:

0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ

Click somewhere in the next paragraph to see a million digits of pi in one base or another.

    Base  1  can't be done.
pi to a million base  2 places
pi to a million base  3 places
pi to a million base  4 places
pi to a million base  5 places
pi to a million base  6 places
pi to a million base  7 places
pi to a million base  8 places
pi to a million base  9 places
pi to a million base 10 places
pi to a million base 11 places
pi to a million base 12 places
pi to a million base 13 places
pi to a million base 14 places
pi to a million base 15 places
pi to a million base 16 places
pi to a million base 17 places
pi to a million base 18 places
 pi to a million base 19 places
 pi to a million base 20 places
 pi to a million base 21 places
 pi to a million base 22 places
 pi to a million base 23 places
 pi to a million base 24 places
 pi to a million base 25 places
 pi to a million base 26 places
 pi to a million base 27 places
 pi to a million base 28 places
 pi to a million base 29 places
 pi to a million base 30 places
 pi to a million base 31 places
 pi to a million base 32 places
 pi to a million base 33 places
 pi to a million base 34 places
 pi to a million base 35 places
 pi to a million base 36 places

(Click here to go to the top of the page.)

generating all these digits: part 1

What follows is a fairly technical discussion of how I got all that data. To skip it, click here.

Still with us? Ok. As suggested above, in the following discussion of computation of pi, the programs actually output pi minus 3.

LISP is so cool, it approaches 0 degrees Kelvin.To do all this computation, I've relied on a fairly ancient programming language called LISP. I think this programming language is one of the coolest toys in the known universe. Not everyone agrees with me; it's been said that LISP isn't dead; it just smells bad.

But I digress. Harrumph. Where was I? Oh, yes. I've actually been using two dialects of LISP for this project: clisp and sbcl. Both of them deliver a floating point constant "pi". But clisp provides an additional feature: it lets you specify, while a LISP program is running, how precise you want your floating numbers to be. Millions of digits if you want. When you tell clisp to use a particular precision for floating point numbers, it recalculates the value of pi right then and there. (So I've seen clisp take hours just to make an adjustment to the precision of floating point numbers.) This means you can get zillions of digits of pi for free.

But sbcl has its advantages too. It runs much faster than clisp. Also it's become increasingly difficult to install clisp on FreeBSD systems. So I use clisp when I must, and move over to sbcl when I can.

My earlier computation (for radices 2, 3, 5, 7, 10, 11, 13, 16, 17, 19, 23, 26, 36) used a clisp program; this earlier program won't work with any other dialect of LISP, because it takes shamelss advantage of the huge number of digits that clisp can provide for pi. This program may be found here.

As an exercise in walking down a blind alley, I started running a different LISP program, more interesting mathematically, using sbcl instead of clisp; this second program is found here. The problem with this program (at least using sbcl on my machines) is that it blows up because it runs out of heap space before computing all million digits. (Heap space is a kind of computer memory; well, no. It's not a particular kind of memory; it's computer memory carved up and managed in a particular way. Details are available here.)

There's a different way to compute pi in different radices using sbcl, however. It turns out that if I already have a million digits for base 36 (thanks, superprecise clisp!), I can derive a million digits for lower-numbered bases from that data (thanks, superfast [sorta] sbcl!). The first step is to covert those million base-36 digits into a rational number: actually two integers, the numerator and denominator of a ratio, which is how LISP stores rational numbers.

I decided to make this ratio using a LISP program. To keep this LISP program from being needlessly complicated, I used a Perl script to generate it; the Perl script reads the base 36 output from the clisp program and converts each digit into a decimal number, reverses the order of the million digits, and emits a chunk of LISP code for each digit. The Perl script is here; the very long LISP program (using sbcl) generated by that Perl script is here; and the actual ratio is here. The file containing the ratio consists of two lines. The first line is the numerator of the ratio, and the second line is the denominator. They are expressed as (very very long) decimal integers. It took slightly less than an hour to generate that ratio using the very long LISP program generated by the Perl script.

The final step was to use this ratio while looping through each radix, 2 to 35, and generating the digits from this ratio. The program is found here; the results are included in the above table.

(Click here to go to the top of the page.)

bases 37 to 1000

Suppose we wanted to push beyond base 36. We could, say, go to base 1000. Why would we want to do such a thing? If we want to imagine humanity as just one tiny, insignificant item in a set of intelligent species, we can draw a picture of that by burying the base 10 expression of pi in a large number of other bases. And that's what we've done here.

Ok, here we go. The previously-mentioned "alphabet" (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) for showing each digit will no longer serve. We will have to find a way to represent digits ranging in value from 0 to 999 (decimal). We can do so easily by abandoning the goal of showing each digit with one character. Instead, we can represent each digit using three decimal digits, so the representations will range from "000" to "999".

For example, using base 7, the first 20 digits of pi after the radix point are shown in the old, conventional manner as ...

06636514320361341102

... but they are shown the new way as ...

000 006 006 003 006 005 001 004 003 002 000 003 006 001 003 004 001 001 000 002

Let's take another example of the three-decimal-digit way of representing digits in an arbitrary radix. To get pi to a million places base 1000, we simply take pi to three million decimal places, and look at the resultant digits in groups of three digits. Remember, each digit in base 1000 can range from 0 to 999. The first digit of pi after the radix point in base 1000 is represented by the three decimal digits 141; the second digit, by 592. Look familiar? In decimal, the first few digits of pi are 3.141592.

(Click here to go to the top of the page.)

generating all these digits: part 2

What follows is a fairly technical discussion of how I generated this new data. To skip it, click here.

The clisp program to generate 3 million decimal digits of pi-3 is here. The generated output is here.

"But wait," some of you may be saying. "You're going to be generating digits of pi in radices ranging from 37 to 999, right?" Well, right. "Ok, so when you get to base 999, how do you know that you're not going to be off a teensy tiny bit in the final digit?" A fair question, I suppose. Math is hard, so I can't be absolutely sure that the precision is adequate for this adventure. I solved this problem using a brute force method. I simply ran a slightly modified clisp program to generate not 3,000,000 digits, but 3,000,050 digits, and I can use the first 3,000,048 of those to produce 1,000,016 digits in base 1,000. The slightly revised clisp program is here; the output is here.

The next step, as when we were generating data for bases 2 to 36, is to use all this data to produce a ratio that approximates pi-3. One would suppose that we could write a Perl script to use the 1,000,016 base-1000 digits to generate an sbcl program which computes the ratio and outputs it to a file. But it's actually simpler to have this Perl script use all 3,000,050 decimal digits, not just the first 3,000,048. It gives us slightly more precision, which we don't need, but it also makes the Perl script simpler. The Perl script is here; the (very long) sbcl program it generates, which in turn generates the ratio approximating 3-pi, is here; and the actual ratio is here. As before, the file containing the ratio consists of two lines. The first line is the numerator of the ratio, and the second line is the denominator. They are expressed as (very very long) decimal integers. It took about 5 1/2 hours to generate that ratio.

(Click here to go to the top of the page.)

the constellation of data

So here's all the data for bases 2 through 1000. Base 10 is buried near the beginning of it. Imagine, if you will, humanity, buried among hundreds and hundreds of other intelligent species. This collection of pi data is a parable of that.

To see the digits for a given radix, click on the radix below. Remember that these digits do not include the initial "3" before the radix point.

   .   51  101  151  201  251  301  351  401  451  501  551  601  651  701  751  801  851  901  951
   2   52  102  152  202  252  302  352  402  452  502  552  602  652  702  752  802  852  902  952
   3   53  103  153  203  253  303  353  403  453  503  553  603  653  703  753  803  853  903  953
   4   54  104  154  204  254  304  354  404  454  504  554  604  654  704  754  804  854  904  954
   5   55  105  155  205  255  305  355  405  455  505  555  605  655  705  755  805  855  905  955
   6   56  106  156  206  256  306  356  406  456  506  556  606  656  706  756  806  856  906  956
   7   57  107  157  207  257  307  357  407  457  507  557  607  657  707  757  807  857  907  957
   8   58  108  158  208  258  308  358  408  458  508  558  608  658  708  758  808  858  908  958
   9   59  109  159  209  259  309  359  409  459  509  559  609  659  709  759  809  859  909  959
  10   60  110  160  210  260  310  360  410  460  510  560  610  660  710  760  810  860  910  960
  11   61  111  161  211  261  311  361  411  461  511  561  611  661  711  761  811  861  911  961
  12   62  112  162  212  262  312  362  412  462  512  562  612  662  712  762  812  862  912  962
  13   63  113  163  213  263  313  363  413  463  513  563  613  663  713  763  813  863  913  963
  14   64  114  164  214  264  314  364  414  464  514  564  614  664  714  764  814  864  914  964
  15   65  115  165  215  265  315  365  415  465  515  565  615  665  715  765  815  865  915  965
  16   66  116  166  216  266  316  366  416  466  516  566  616  666  716  766  816  866  916  966
  17   67  117  167  217  267  317  367  417  467  517  567  617  667  717  767  817  867  917  967
  18   68  118  168  218  268  318  368  418  468  518  568  618  668  718  768  818  868  918  968
  19   69  119  169  219  269  319  369  419  469  519  569  619  669  719  769  819  869  919  969
  20   70  120  170  220  270  320  370  420  470  520  570  620  670  720  770  820  870  920  970
  21   71  121  171  221  271  321  371  421  471  521  571  621  671  721  771  821  871  921  971
  22   72  122  172  222  272  322  372  422  472  522  572  622  672  722  772  822  872  922  972
  23   73  123  173  223  273  323  373  423  473  523  573  623  673  723  773  823  873  923  973
  24   74  124  174  224  274  324  374  424  474  524  574  624  674  724  774  824  874  924  974
  25   75  125  175  225  275  325  375  425  475  525  575  625  675  725  775  825  875  925  975
  26   76  126  176  226  276  326  376  426  476  526  576  626  676  726  776  826  876  926  976
  27   77  127  177  227  277  327  377  427  477  527  577  627  677  727  777  827  877  927  977
  28   78  128  178  228  278  328  378  428  478  528  578  628  678  728  778  828  878  928  978
  29   79  129  179  229  279  329  379  429  479  529  579  629  679  729  779  829  879  929  979
  30   80  130  180  230  280  330  380  430  480  530  580  630  680  730  780  830  880  930  980
  31   81  131  181  231  281  331  381  431  481  531  581  631  681  731  781  831  881  931  981
  32   82  132  182  232  282  332  382  432  482  532  582  632  682  732  782  832  882  932  982
  33   83  133  183  233  283  333  383  433  483  533  583  633  683  733  783  833  883  933  983
  34   84  134  184  234  284  334  384  434  484  534  584  634  684  734  784  834  884  934  984
  35   85  135  185  235  285  335  385  435  485  535  585  635  685  735  785  835  885  935  985
  36   86  136  186  236  286  336  386  436  486  536  586  636  686  736  786  836  886  936  986
  37   87  137  187  237  287  337  387  437  487  537  587  637  687  737  787  837  887  937  987
  38   88  138  188  238  288  338  388  438  488  538  588  638  688  738  788  838  888  938  988
  39   89  139  189  239  289  339  389  439  489  539  589  639  689  739  789  839  889  939  989
  40   90  140  190  240  290  340  390  440  490  540  590  640  690  740  790  840  890  940  990
  41   91  141  191  241  291  341  391  441  491  541  591  641  691  741  791  841  891  941  991
  42   92  142  192  242  292  342  392  442  492  542  592  642  692  742  792  842  892  942  992
  43   93  143  193  243  293  343  393  443  493  543  593  643  693  743  793  843  893  943  993
  44   94  144  194  244  294  344  394  444  494  544  594  644  694  744  794  844  894  944  994
  45   95  145  195  245  295  345  395  445  495  545  595  645  695  745  795  845  895  945  995
  46   96  146  196  246  296  346  396  446  496  546  596  646  696  746  796  846  896  946  996
  47   97  147  197  247  297  347  397  447  497  547  597  647  697  747  797  847  897  947  997
  48   98  148  198  248  298  348  398  448  498  548  598  648  698  748  798  848  898  948  998
  49   99  149  199  249  299  349  399  449  499  549  599  649  699  749  799  849  899  949  999
  50  100  150  200  250  300  350  400  450  500  550  600  650  700  750  800  850  900  950 1000

(Click here to go to the top of the page.)

finding words in pi

I'm working on finding hidden words in the base 26 digits. My progress (none so far) will be reported here.