Post Reply 
An old puzzle, extended precision - and logs
07-28-2016, 09:26 AM
Post: #1
An old puzzle, extended precision - and logs
I found an old [1907] puzzle book, Canterbury Puzzles One of the puzzles involved a cask holding 100 cups of wine. Every night, for 30 nights, a young monk steals a cup - and tops up the cask with a cup of water. The puzzle is to determine exactly how much wine the monk stole over those 30 nights.

This requires you to solve: 100 (1 - (99/100)^30) - which ends up having 60 decimal places.

While a quick Google search will find a arbitrary precision calculator, I was intrigued by the original 1907 answer: while giving the right value, it claimed the use of logarithms was required. I can see that:

log (0.99)^30 = 30 * log (0.99)

I just can't see how to calculate logs (and anti-logs) to the required number of decimal places. At best, in my youth, I saw tables of logarithms to 5 decimal places.

Is there a "lost art" for using log tables, to get the extended precision required? Or is there some other secret?
Find all posts by this user
Quote this message in a reply
07-28-2016, 12:16 PM
Post: #2
RE: An old puzzle, extended precision - and logs
(07-28-2016 09:26 AM)sa-penguin Wrote:  This requires you to solve: 100 (1 - (99/100)^30) - which ends up having 60 decimal places.

While a quick Google search will find a arbitrary precision calculator, I was intrigued by the original 1907 answer: while giving the right value, it claimed the use of logarithms was required.

No, logs are not required. But they can be used to evaluate 0,99^30.

(07-28-2016 09:26 AM)sa-penguin Wrote:  I can see that:

log (0.99)^30 = 30 * log (0.99)

That's the way with using logs.

(07-28-2016 09:26 AM)sa-penguin Wrote:  I just can't see how to calculate logs (and anti-logs) to the required number of decimal places. At best, in my youth, I saw tables of logarithms to 5 decimal places.

Do you really want a 60-digit result? Is this the result printed in the book?
Then there's another approach that can even be used with pencil and paper.

(07-28-2016 09:26 AM)sa-penguin Wrote:  Is there a "lost art" for using log tables, to get the extended precision required? Or is there some other secret?

I don't think this is a secret, but here is how you can do it:

Code:
  (99/100)^30 
= 99^30 / 100^30
= 99^30 / 10^60

      99x = 100x - x

    99*99 = 9900 - 99         = 9801   (=99^2)
  9801*99 = 980100 - 9801     = 970299   (=99^3)
970299*99 = 97029900 - 970299 = 96059601   (=99^4)
      ...   ...

Do this until 99^30, then shift the decimal point 60 digits left to get 0,7397...
1 minus this is 0,2602996... so the answer (times 100) is 26 cups.

Dieter
Find all posts by this user
Quote this message in a reply
07-29-2016, 11:48 AM
Post: #3
RE: An old puzzle, extended precision - and logs
(07-28-2016 12:16 PM)Dieter Wrote:  I don't think this is a secret, but here is how you can do it:
Code:
  (99/100)^30 
= 99^30 / 100^30
= 99^30 / 10^60

      99x = 100x - x

    99*99 = 9900 - 99         = 9801   (=99^2)
  9801*99 = 980100 - 9801     = 970299   (=99^3)
970299*99 = 97029900 - 970299 = 96059601   (=99^4)
      ...   ...

Do this until 99^30, then shift the decimal point 60 digits left to get 0,7397...
1 minus this is 0,2602996... so the answer (times 100) is 26 cups.

Dieter
Very elegant!
A re-reading of the answer mentions a "simplified process of calculation".
Probably the same as you have shown.
Quote:and after the thirtieth theft there would remain in the cask the thirtieth power of 99 divided by the twenty-ninth power of 100.
This by the ordinary method of calculation gives us a number composed of 59 figures to be divided by a number composed of 58 figures!
But by the use of logarithms it may be quickly ascertained that the required quantity is
very nearly 73-97/100 pints of wine left in the cask. Consequently the cellarer stole nearly 26.03 pints.
The monks doubtless omitted the answer for the reason that they had no tables of logarithms, and did not care to face the task of making that long and tedious calculation in order to get the quantity "to a nicety," as the wily cellarer had stipulated.

By a simplified process of calculation, I have ascertained that the exact quantity of wine stolen would be:
26.0299626611719577269984907683285057747323737647323555652999
Find all posts by this user
Quote this message in a reply
07-30-2016, 09:27 AM
Post: #4
RE: An old puzzle, extended precision - and logs
(07-28-2016 09:26 AM)sa-penguin Wrote:  log (0.99)^30 = 30 * log (0.99)

I just noticed that of course this has to read

log(0,99^30) = 30 · log(0,99)

Dieter
Find all posts by this user
Quote this message in a reply
07-30-2016, 04:10 PM
Post: #5
RE: An old puzzle, extended precision - and logs
Just as an aside to the discussion, my father, a mariner had a large volume of 10-figure tables of all kinds, for navigation and other nautical purposes. Sadly, I lost them in a house move some years ago. Presumably larger precision tables would have been more commonplace in the pre-digital era.
Find all posts by this user
Quote this message in a reply
07-30-2016, 07:56 PM (This post was last modified: 07-30-2016 07:58 PM by Dieter.)
Post: #6
RE: An old puzzle, extended precision - and logs
(07-30-2016 04:10 PM)ColinJDenman Wrote:  Just as an aside to the discussion, my father, a mariner had a large volume of 10-figure tables of all kinds, for navigation and other nautical purposes. Sadly, I lost them in a house move some years ago. Presumably larger precision tables would have been more commonplace in the pre-digital era.

The well known "Abramowitz & Stegun" (Handbook of Mathematical Functions) includes 10-digit tables of logs, powers and roots. The ln table has 15 digits, e^x has 18 and sin/cos even 23 digits. At least if you have a printed version or a PDF where the tables have not been removed. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
07-31-2016, 02:25 PM
Post: #7
RE: An old puzzle, extended precision - and logs
(07-30-2016 07:56 PM)Dieter Wrote:  At least if you have a printed version or a PDF where the tables have not been removed. ;-)

Dieter

Thank you for the suggestion -- another wasted afternoon guaranteed ;-)) Purely for old times sake.
Find all posts by this user
Quote this message in a reply
08-07-2016, 08:12 AM (This post was last modified: 08-07-2016 08:15 AM by StephenG1CMZ.)
Post: #8
RE: An old puzzle, extended precision - and logs
(07-29-2016 11:48 AM)sa-penguin Wrote:  
(07-28-2016 12:16 PM)Dieter Wrote:  I don't think this is a secret, but here is how you can do it:
Code:
  (99/100)^30 
= 99^30 / 100^30
= 99^30 / 10^60

      99x = 100x - x

    99*99 = 9900 - 99         = 9801   (=99^2)
  9801*99 = 980100 - 9801     = 970299   (=99^3)
970299*99 = 97029900 - 970299 = 96059601   (=99^4)
      ...   ...

Do this until 99^30, then shift the decimal point 60 digits left to get 0,7397...
1 minus this is 0,2602996... so the answer (times 100) is 26 cups.

Dieter
Very elegant!
A re-reading of the answer mentions a "simplified process of calculation".
Probably the same as you have shown.
Quote:and after the thirtieth theft there would remain in the cask the thirtieth power of 99 divided by the twenty-ninth power of 100.
This by the ordinary method of calculation gives us a number composed of 59 figures to be divided by a number composed of 58 figures!
But by the use of logarithms it may be quickly ascertained that the required quantity is
very nearly 73-97/100 pints of wine left in the cask. Consequently the cellarer stole nearly 26.03 pints.
The monks doubtless omitted the answer for the reason that they had no tables of logarithms, and did not care to face the task of making that long and tedious calculation in order to get the quantity "to a nicety," as the wily cellarer had stipulated.

By a simplified process of calculation, I have ascertained that the exact quantity of wine stolen would be:
26.0299626611719577269984907683285057747323737647323555652999

Earlier the problem referred to cups, but here we have " 26.03 pints".
Is that a typo or is the size of a cup in pints known?
I am guessing they are pint-sized cups.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
08-07-2016, 08:14 AM
Post: #9
RE: An old puzzle, extended precision - and logs
I think he was stealing with a cup that held one pint.
Find all posts by this user
Quote this message in a reply
07-01-2022, 05:28 AM (This post was last modified: 07-01-2022 03:03 PM by Thomas Klemm.)
Post: #10
RE: An old puzzle, extended precision - and logs
(07-29-2016 11:48 AM)sa-penguin Wrote:  
Quote:By a simplified process of calculation, I have ascertained that the exact quantity of wine stolen would be:
26.0299626611719577269984907683285057747323737647323555652999

We can use the following program with Free42 Decimal:
Code:
00 { 3-Byte Prgm }
01 LN1+X
02 ×
03 E↑X-1
04 END

30
ENTER
-.01
R/S

-2.602996266117195772699849076832851e-1
Find all posts by this user
Quote this message in a reply
07-01-2022, 11:37 AM
Post: #11
RE: An old puzzle, extended precision - and logs
(07-28-2016 09:26 AM)sa-penguin Wrote:  This requires you to solve: 100 (1 - (99/100)^30) - which ends up having 60 decimal places.

While a quick Google search will find a arbitrary precision calculator...

Such as the HP 50g in exact mode:

Code:

\<<1 99 100 / 30 ^ - 100 * EVAL
\>>
Find all posts by this user
Quote this message in a reply
07-01-2022, 01:34 PM
Post: #12
RE: An old puzzle, extended precision - and logs
Not to mention newRPL, of course:

Code:
«
  60 SETPREC
  1 99 100 / 30 ^ - 100 *
»
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)