104

Pretend you are in 1859. What is a fast, efficient, and accurate way to numerically evaluate constants like that to, say, 20 decimal places, using ONLY pen and paper?

  • 9
    Dear Tito: +1. Nice question! But it would be great if you could add some background. – Pierre-Yves Gaillard Jan 22 '12 at 18:40
  • I, too, am curious how this would be solved. Perhaps it would help to include what methods (that are relevant) that you could not use in 1859. – 000 Jan 22 '12 at 18:51
  • 4
    Here's a guess: you can calculate square roots using e.g. Newton's method (quadratic convergence) and $\pi$ would already be known to a large number of decimal places, so you just have to multiply (getting $\pi\sqrt{163}\approx 40.10917...)$. Then it's not unreasonable to imagine a table of values of the exponential function exists, and that it includes the value of $\exp(40)$ (if not, then raise $\exp(10)$ to the fourth power). Finally, you just need to calculate $\exp(0.10917)$ using the Taylor expansion, and multiply. – Chris Taylor Jan 22 '12 at 18:52
  • Well, Hermite has the relevant paper in French so perhaps Pierre can access that. (Kindly google "Ramanujan constant".) But I have long wondered what method can be used, whether known in 1859 or not, that can enable us to evaluate it fast and accurately without a computer. Surely Hermite did not do it in a crude, brute-force manner. – Tito Piezas III Jan 22 '12 at 19:01
  • Chris, I supposed he could have done that. But 20 decimal places of pi multiplied by 20 decimal places of sqrt{163}. How many minutes would that take using pen and paper? Then calculate exp(x) using Taylor expansion (which involves powers(!) of x) to 20 decimals manually. Hermite must have had a lot of time in his hands... :-) – Tito Piezas III Jan 22 '12 at 19:10
  • I know very little of how things actually were done, but it doesn't seem unreasonable to suppose that Hermite had access to a pool of calculators (in the modern vernacular - graduate students) who could perform this kind of tedious calculation for him. I agree that it sounds like a lot of work though, and I wouldn't be surprised to learn that there is a more efficient method. – Chris Taylor Jan 22 '12 at 19:17
  • 3
    Dear Tito, I don't know enough about the history of such calculations to say anything that merits being an answer, but it may still be worthwhile to mention that there were tools available for making accurate computations besides pen and paper, such as log tables. So at least raising $e$ to the power of $\pi \sqrt{163}$ (once the latter is known) could probably (or at least possibly?) achieved by looking at a table of natural logs. If tables aren't accurate enough, then there are standard techniques of interpolation available with which one can try to obtain further digits. Regards, – Matt E Jan 22 '12 at 19:21
  • 9
    But note also that in this case, one can compute $j\bigl((1+\sqrt{-163})/2\bigr)$ exactly by general theory of CM, and the difference between this number and $-e^{\pi \sqrt{163}}$ is equal (looking at the $q$-expansion for the modular function $j$) to $744 - 196884 e^{-\pi\sqrt{163}} + $ terms of order equal to $e^{-2\pi\sqrt{163}}.$ So one can also make the computation you ask about by bounding the (very small) number $e^{-\pi\sqrt{163}}$ from above, which may (?) be easier. Regards, – Matt E Jan 22 '12 at 19:27
  • Chris, re "graduate students", hehe. :-) I have read that the Manhattan Project used women as calculators to do the tedious calculations, so Hermite may have had his "assistants" do it for him. (No wonder he missed $e^{\pi\sqrt{58}}$.) – Tito Piezas III Jan 22 '12 at 19:27
  • Dear Matt, maybe you are right that he didn't exactly knew the precise value of $e^{\pi\sqrt{163}}$, but only knew it differed from the integer $640320^3 + 744$ by a certain small amount. It would be good to read his original paper, but its in French. – Tito Piezas III Jan 22 '12 at 19:33
  • 8
    A paper being in French shouldn't be an obstruction. French mathematics reads about as easily as English mathematics, even to a English-only speaker. Besides, you can use Google translate to help you with some of the hard spots. – Ryan Budney Jan 22 '12 at 20:37
  • "it doesn't seem unreasonable to suppose that Hermite had access to a pool of calculators (in the modern vernacular - graduate students) who could perform this kind of tedious calculation for him." LOL.

    Could there possibly be a general expression for $e^{\pi a^{\frac{1}{2}}}$ that would be easy to calculate?

    – 000 Jan 22 '12 at 22:34
  • This related question asks how one would determine, in 1847, that ${\left(\pi^\pi\right)}^{\left(\pi^\pi\right)}$ is not an integer. Alexander Walker's brilliant answer deserves a look. – MJD Jul 22 '14 at 18:03

4 Answers4

68

The French paper of Hermite (1859) 'Sur la théorie des equations modulaires' is available freely at Google books, it begins at page 29.

You'll find there the value of $e^{\pi\sqrt{43}}$ with all the correct digits but concerning $e^{\pi\sqrt{163}}$ there is only the indication that the fractional part should begin with twelve consecutive $9$. He clearly used modular properties to deduce this as explained by Matt. Wikipedia's page concerning Heegner numbers could help too.

At first glance Hermite doesn't seem to provide his computations' secrets concerning $e^{\pi\sqrt{43}}$, polynomials of order $48$ of page 67 (he speaks of "quite long but not at all impractical calculation" about them) and so on... Clearly he didn't fear tedious computations!

So let's see what we can do with logarithms or exponential tables. The 'state of the art' for these (1859) days may perhaps be found in this paper of 1881 from Alexander Ellis : Gray published Tables for twelve-place logarithms in 1845 and Thoman a "Tables de logarithmes à 27 décimales" in 1867. Twelve digits seem enough for the nine digits of the integer part of $e^{\pi\sqrt{43}}$ and Hermite probably deduced the fractional part by inversion and multiplication of this result.

Let's suppose arbitrary that he used exponential tables (he could as well have used logarithm tables or $log_{10}$ tables or something more subtle 'AGM like' who knows...)

I'll start with $\pi \sqrt{43} \approx 20.6008006943$ ($\sqrt{43}$ is obtained quickly by iterations of $n'=n^2+43 d^2$,$d'=2nd$) and try to get $e^{\pi \sqrt{43}}\approx 884736744.000$

I used the 'relatively recent' Abramowitz and Stegun tables that I'll 'round' at 12 digits for my 'H-emulation'.

$e^{20}$ is tabulated page 138 as ( 8)4.85165 19540 98 and this value of $485165195.410$ will be our reference. We will have to multiply this by $e^{0.6008006943}$ (nearly $1.82357834477$). Let's try to get this one :

  • by interpolation between $e^{0.600}\approx 1.82211880039$ and $e^{0.601}\approx 1.82394183055$ from the tables we get : $1.82357849025$ with the final result $884736814.567$ clearly insufficient...
    To get something more exact we need more tabulated values or expand $\displaystyle e^{0.601-0.6008006943}$ in Taylor series getting $e^{0.601}e^{-0.0002}e^{0.0000007}e^{-0.000000005}=1.82357834605$ with the final result $884736744.607$ not to far from our target (the idea is that the Taylor series for $e^{-0.0002}$, $e^{0.0000007}$... are fast)

  • or by multiplication by $e^{0.6}$, $e^{0.0001}$ (8 times), $e^{0.0000001}$ (6 times), $e^{0.00000001}$ (9 times), $e^{0.000000001}$ (4 times) at this point the final result is $884736743.722$ and we are nearly there...

Let's note that the second method allows to get high precision just by 'pre-evaluation' of some terms. In fact $\displaystyle e^{10^k}$ (for $k=1,0,-1,-2\cdots -18$) evaluated with high precision should have worked for $e^{\pi\sqrt{163}}$ !
EDIT2: evaluating directly $e^{0.0000006}$, $e^{0.00000009}$, $e^{0.0000000043}$ to 18 digits would probably be more efficient and the result could be evaluated this way : $\displaystyle a e^{\epsilon}= a + (a)\frac{\epsilon}{1} + \left(\frac{a\epsilon}{1}\right)\frac{\epsilon}2+\cdots$ (each time the previous term is mutiplied/divided by $\frac{\epsilon}n$ and added to the result)
some excellent mental calculators of these days could have contributed too!

Of course Hermite's method could have be much more subtle. Vladimir Arnold pointed out that many techniques like elliptic functions were better known in the nineteenth century than now. I think that the same could be said about quite some methods to solve Diophantine equations before the time of computers as you may confirm! :-)


OTHER METHODS : Let's try to apply the general method proposed by Apostol (in tzs' answer) or rather the idea of another Caltech professor for computing 'exponentials in your head' : Richard Feynman (see J.M.'s extract 'Lucky Numbers' from Feynman's very funny book "Surely You're Joking, Mr. Feynman!").

Let's look at one of his favorite examples : he was asked to compute $e^3$ 'in his head' and was able to answer quickly $20.085$. He needed only the values of $\ln 2$ and $\ln 10$ in this case. Let's detail this (to 6 digits here) : $\ln 10\approx 2.302585$ and $\ln 2\approx 0.693147$ but their sum is $\approx 2.995732= 3-\epsilon$ with $\epsilon\approx 0.004268$ so that : $$e^3=e^{\ln 10 +\ln 2 +\epsilon}\approx 10\cdot 2 \left(1+\epsilon(1+\frac{\epsilon}2)\right)\approx 20+0.08536+ 0.000182 \approx 20.085542$$ If asked for $e^4$ he would simply multiply this by $2.7182818$ to get : $e^4\approx 54.59816$ (the relation used is $4 \approx 1 +\ln 2 +\ln 10$).

A generalization of Feynman's trick to compute $e^a$ would consist in searching linear relations between $a$, $1$, $\ln 2$ and $\ln 10$ (we may accept other constants especially logarithms since $e^c$ should be easy to evaluate). This is easier to do now with algorithms like PSLQ or LLL, in Hermite's days I think you could only use continued fractions or guess...

For $\pi \sqrt{43}$ we may get excellent approximations like $2^{18} 15^3$, $5^{64/5}$.
For $\pi \sqrt{163}$ approximations are $2^{30}\cdot 5^{12}$, $2^{10}\cdot 3^7\cdot 5^{11}\cdot 7^4$, $2^7\cdot 3^{20}\cdot 5\cdot 7^6$, $e^{40} 4\cdot 3^8\cdot 5/7^6$ (I suppose that we have a table of logarithms and of exponentials of integers given with high precision).


But to be honest I think that none of these tricks were used by Hermite himself for these evaluations because he knew, as you may find in the previous links, 'Heegner numbers' for example, that the nearest integer was given by $960^3+744=884736744$ for $e^{\pi \sqrt{43}}$ and by $640320^3+744=262537412640768744$ for $e^{\pi \sqrt{163}}$ so that he needed no evaluation of exponential at all !!

Raymond Manzoni
  • 43,021
  • 5
  • 86
  • 140
  • 2
    probably Arnold meant the nineteenth century, no? – Mariano Suárez-Álvarez Jan 24 '12 at 03:53
  • @Mariano: Oops yes of course thanks! – Raymond Manzoni Jan 24 '12 at 07:10
  • @Raymond: Thanks so much for the "H-emulation" and detailed response! P.S. As Pierre pointed out, Hermite did have a "calculator" for $\exp(\pi\sqrt{43}), the mathematician Serret who, being a few years older, couldn't have been Hermite's "graduate student". :-) – Tito Piezas III Jan 24 '12 at 13:25
  • @Tito: Thanks to you too for the subject and for your Considerable work on Algebraic Identities ! (my allusion was relative to Lander and others method for 5th Powers Diophantine Equations) – Raymond Manzoni Jan 24 '12 at 21:12
  • Thanks to all for your interest!! Perhaps that Numbers remain as interesting now as in these old days! – Raymond Manzoni Jan 24 '12 at 21:29
  • @Raymond. No wonder your name was familiar. You (independently of Rathbun and Wroblewski) helped me answer the question whether Euler's solution to {x+y, y+z, x+z, x-y, y-z, x-z} all simultaneously square was the smallest. See Mengoli's Six Square Problem. – Tito Piezas III Jan 25 '12 at 13:54
  • My contribution was rather minor but I am glad for the reference! Thanks! – Raymond Manzoni Jan 25 '12 at 22:44
  • Nice answer! Regarding computation of the logarithm: there is indeed an AGM-type method, due to Borchardt. Though, it's 1881, so maybe a bit too late for Hermite to use... – J. M. ain't a mathematician Jan 26 '12 at 03:58
  • @J.M. Thanks for both! I'll have to try this algorithm (and read 'Pi and the AGM' in more details... :-)). – Raymond Manzoni Jan 26 '12 at 07:13
  • @RaymondManzoni Is it possible to use Taylor's expansion for $\exp$? – Frank Nov 02 '16 at 22:01
  • @Frank: Well I used the Taylor expansion for $\exp$ except that I didn't use it to evaluate $x_1:=\exp(\pi\sqrt{43})$ (or $x_2:=\exp(\pi\sqrt{163})$) directly but only the easier $\exp(\pi\sqrt{43}-20)$ (or $\exp(\pi\sqrt{163}-40)$). Computing $;\exp(x)=\sum_{n\ge 0}\dfrac {x^n}{n!},$ directly would require the evaluation of at least $,20,e\approx 54,$ terms for $x_1$ since, according to Stirling, $\dfrac {x^n}{n!}\sim \dfrac 1{\sqrt{2\pi n}}\left(\dfrac{e,x}n\right)^n,$ which will get smaller than $1$ (neglecting the square root) as $\dfrac{e,x}n$ approaches $1$. – Raymond Manzoni Nov 02 '16 at 22:44
  • @RaymondManzoni What would you do if it was something like $e^{\pi\sqrt{58}}$? Something where $d$ is not a Heegner number? – Frank Nov 03 '16 at 15:38
  • @Frank: That's actually the point of this answer : not use the Heegner number properties to evaluate $e^{\pi\sqrt{n}}$. For $n=58;$ I could for example use $;\pi\sqrt{58}\approx 24-0.074343159211,$, search $e^{24}$ in a table and evaluate $e^{-.074343159211}$ using Taylor series. Faster variants are possible like noticing the (rather nontrivial !) approximation $;\pi\sqrt{58}=8\ln(6)+4\ln(11)-\epsilon;$ with $;\epsilon\approx 4.2291452;10^{-9};$ to deduce that $;e^{\pi\sqrt{58}}\approx 6^8,11^4(1-4.2291452;10^{-9})\approx 24591257751.99999987$. Just imagine other tricks! – Raymond Manzoni Nov 03 '16 at 18:23
  • In science university didn't they have people paid to run and check such tedious computations ? Every student had to learn several methods to estimate divisions, powers, logarithms, trigonometric functions (using tables) but doing so efficiently up to arbitrary precision is a full time job. For example I bet they did a lot of numerical checks to be sure the modular forms they found were really invariant under $z \mapsto -1/z$ – reuns Jul 02 '19 at 20:56
  • @reuns In 1894 Hermite wrote "Vous vous reposez, mon cher ami, d'une campagne glorieuse, couronnée par le succès; moins heureux que vous, je suis maintenant à porter envie et jalousie aux professeurs des universités allemandes qui donnent à leurs élèves, heureux et reconnaissants de les recevoir de leurs mains savantes, des calculs algébriques, dont ils tirent, en se faisant naturalistes, des observations utiles qui peuvent les conduire au but. Ces calculs, je les ferai moi-même, en me trompant et les recommençant, en invoquant vainement, je le crains bien, la devise de Guillaume d'Orange." – Raymond Manzoni Jul 03 '19 at 08:58
  • This appeared in "Correspondance d'Hermite et de Stieltjes". In 1889 we find : "Mais les calculs numériques qu'il faut faire sont tellement fastidieux que j'ai craint d'abuser de la patience et de la bonne volonté du calculateur auquel j'ai eu recours" (a continued fraction for $e^3$ required fifty or sixty digits according to Stieltjes who carried this work over to 1890).
    Here Hermite's calculator is the astronomer C.-J. Serret (who worked on perturbation theory in celestial mechanics. Cf Pierre-Yves Gaillard's andwer for more details and links).
    – Raymond Manzoni Jul 03 '19 at 08:58
25

This is a bibliographical complement to Raymond wonderful answer. Since it contains no mathematics, I used the community wiki mode.

Hermite wrote a series of five articles under the title Sur la théorie des équations modulaires:

Hermite, C. Sur la théorie des équations modulaires. Comptes Rendus Acad. Sci. Paris 48, 1079-1084 and 1095-1102, 1859.

Hermite, C. Sur la théorie des équations modulaires. Comptes Rendus Acad. Sci. Paris 49, 16-24, 110-118, and 141-144, 1859.

The five articles can be freely and legally retrieved in pdf format by following the appropriate links given on this French National Library page.

These articles have been reprinted in Volume 2 of Hermite's Oeuvres Complètes, which can also be freely and legally retrieved in pdf format from this University of Michigan page.

The retrieval being somewhat tedious in both cases, I've put the various pdf files here.

The files corresponding to the five articles (from the French National Library) are named hermite_1.pdf to hermite_5.pdf here.

University of Michigan divided Volume 2 of Hermite's Oeuvres Complètes into twenty page files. The relevant article is scattered through three such files, named hermite_a.pdf, hermite_b.pdf, and hermite_c.pdf here. The article goes from p. 38 to p. 82.

The page, containing the first digits of $\exp(\pi\sqrt{43})$, Raymond points to at the beginning of his answer is page 8 of this pdf file (p. 1101 of the scanned text), or page 15 of this pdf file (p. 60 of the scanned text).

There is a fact I find very surprising about this famous page: In the Comptes Rendus version, Hermite thanks C.-J. Serret for having done the computation:

... on trouve (*) $$e^{\pi\sqrt{43}}=884736743.9997775\dots$$

(*) Je dois ce calcul à l'obligeance de M. C.-J. Serret.

Again, I find strange that this acknowledgment has been suppressed from the reprinted version.

EDIT. Life is sometimes funny:

Tito asked "How did Hermite calculate $e^{\pi\sqrt{163}}$?"

Raymond answered "Hermite calculated $e^{\pi\sqrt{43}}$, not $e^{\pi\sqrt{163}}$".

Then it turns out that Hermite did not calculate $e^{\pi\sqrt{43}}$, but C.-J. Serret did.

Note that C.-J. Serret (not to be confused with Joseph-Alfred Serret) was not a mathematician, but an astronomer. This suggests (I think) that, probably, methods similar to the ones described by Raymond were used.

8

Often you can find some expression for a number that lends itself well to pencil and paper computation. For instance, suppose you were trying to compute $\sqrt{3}$. You can use this expression:

$$\sqrt{3}=\frac{1732}{1000}\left(1-\frac{176}{3000000}\right)^{-1/2}$$

If you use the binomial series for $(1-x)^{-1/2}$ you can compute that efficiently. $176/3000000$ is small enough that the series converges rapidly. This particular example is a problem from Apostol's Calculus, volume I, and it asks for 15 places, which if I recall correctly requires out to the $x^5$ term of the binomial series.

Doing this kind of calculation used to be part of a decent mathematical education, before calculators were common, and any working mathematician then would be quite agile at this (or would have an assistant whose job was to do calculations for the mathematician). Now we have pocket calculators, and computers that will quickly do these things for us to hundreds of decimal places, and so becoming adept at pencil and paper calculation is simply not a skill we are required to develop.

tzs
  • 729
  • 2
    This is fine, but it doesn't really answer the question, does it? Rather, it raises the question, is there some clever way to rewrite $e^{\pi\sqrt{163}}$ to make it amenable to hand computation, which is pretty much where we started. – Gerry Myerson Jan 24 '12 at 05:28
  • It doesn't answer the question in the title, which was about a specific constant, but the body of the question was about "constants like that", so I thought it reasonable to treat it as a general question rather than one tied to a specific constant. – tzs Jan 24 '12 at 06:44
  • Fair enough. I guess it comes down to whether $\sqrt3$ is a "constant like $e^{\pi\sqrt{163}}$," and I suppose that's a matter of opinion. – Gerry Myerson Jan 24 '12 at 11:47
  • 1
    Well, we can similarly start from the approximation $\sqrt{163} = 12.767$ and write $\sqrt{163} = (12767/1000)(1-3711/(163\times 10^6))^{-1/2}$; from the binomial series we'd get a better approximation of $\sqrt{163}$, which could presumably be made good enough to be useful. To get $\sqrt{163} \approx 12.767$ one could interpolate linearly between $\sqrt{161.29} = 12.7$ and $\sqrt{163.84} = 12.8$. – Michael Lugo Jan 24 '12 at 23:02
0

Reducing everything to calculating something that is easier to manage

$$e^{\pi\sqrt{163}}=x$$

In order to simplify the calculation take $x=\frac{p}{10^{18}}$

$$\ln(p)^2-36\ln(p)\ln(10)+324\ln(10)^2-163\pi^2$$

Now this one has two zeros and one is substantially smaller than another so much easier to find

$$y^2-36y\ln(10)+324\ln(10)^2-163\pi^2=0$$

You calculate this by either replacing all constants or just calculating the final result first.

$$y_1=1.33736168276030...$$

It is simpler to find and handle this smaller number

$$e^{y_1}=3.808980937007642...$$

Now it is simply

$$e^{\pi\sqrt{163}}=\frac{1}{3.808980937007642...}10^{18}$$

Three required operations can be done with any precision available at the time. $\pi$ was known to hundred decimal places which is more than sufficient for our calculations.