# How did Hermite calculate $e^{\pi\sqrt{163}}$ in 1859?

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?

-
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
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
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
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
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

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 !!

-
probably Arnold meant the nineteenth century, no? – Mariano Suárez-Alvarez Jan 24 '12 at 3:53
@Mariano: Oops yes of course thanks! – Raymond Manzoni Jan 24 '12 at 7: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 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. - Thanks for the pdfs! – lhf Jan 24 '12 at 11:16 @Pierre. Thanks for the clarification. (I did assume M.C.J. Serret was "Monsieur Joseph Serret" the mathematician, but turns out he is a different person.) – Tito Piezas III Jan 24 '12 at 13:48 Dear @Tito: You're welcome. You can take a look at this Google search. (Also "M. C.-J. Serret" means "Monsieur C.-J. Serret".) – Pierre-Yves Gaillard Jan 24 '12 at 13:54 @Pierre-Yves: Thanks for the praise and your biographical information here! Note that the story could continue since C.-J. Serret could have asked someone else to do the job who could ...! :-) In these days savants (mental calculators) where presented to the Académie des Sciences as you may read in Binet's book of 1894 Psychologie des grands calculateurs et joueurs d'échecs so that just to test them... – Raymond Manzoni Jan 24 '12 at 21:22 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. - 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 5: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 6: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 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