## Wednesday, 10 July 2013

### logs

Q. How many seconds in a year?  No you can't use a calculator and I only want a rough answer - within, say, about 25% of the correct answer.  Quick, quick, the train is leaving the station, I need an answer - how many heartbeats until I see my beloved again?

We can manage most of our lives quite well without answering such questions, indeed without knowing how to answer them. But builders do it all the time although, as many of them left school as soon as they could because they thought with their hands, they probably don't do it with long multiplication.  Older builders can still guesstimate a quote after their calculator falls out of their shirt pocket into a bucket of wet plaster.

A. I know there are 3600 seconds in an hour (6x6)x(10x10) because I know my times-tables.  Any fule kno there are 24 hours in the day and 365 days in the year. So we have
3600 x 24 x 365
roughly a third of 10,000 times a quarter of 100 times a third of 1000
multiply all the 10s by sticking the zeros together
1000,0 00 ,000  = a billion
take one zero away because a third x a third is about a tenth
100,00 0,0 000 = 100 million
but you only need a quarter of that subtotal, so it's about 25,000,000 seconds until this time next year.
Calculator answer: 31,536,000 or 26% bigger. With a bit of practice you can do that sort of thing in your head or with a pencil on a off-cut of 2x4 timber.

But it gets more hairy if you need to know how much to charge your client for 175 wall studs each costing \$4.25 knowing that the stuff your supplier sells you  will have about 5% of the timber too waney to use.  Engineers solve such problems all the time, they need to multiply numbers together to a certain accuracy but not get obsessive about the 6th decimal point - they just want their buildings to stay up without over-engineering the pudding because that will cost more.

Scottish school drop-out John Napier (1550-1617) invented a wonderful tool for making multiplication easier.  He published his idea in a booklet Mirifici Logarithmorum Canonis Descriptio which brought logarithms into general use and opened up huge possibilities in navigation, astronomy and finance.  Napier recognised that you can do multiplication (hard) by adding (easy) exponents.  Wha'?? my math-anxious readers cry.

Any fule kno that 100 (10x10) is ten squared; 1000 (10x10x10) is ten cubed.  You can represent these numbers as 102 and 103 or (easier to typeset) 10^2 and 10^3. The 2 and 3 are called exponents. Napier's key insight was seeing that to multiply 100 x 1000 you just add the exponents 10^2 x 10^3 = 10^(2+3) = 10^5 = 100,000.  That's a long way round the houses, you may say, to get to your own front door.  But any number can be represented as an exponent of 10, and Napier calculated loadsa these and published them in printed tables.  If you have a harder multiplication problem like 92 x 1024 you  look up their logs in the table (1.964 and 3.010);  add them (4.974); then convert back to proper numbers (94188).  Which is, with practice, quicker than
and within 2 parts in 10,000 of being completely accurate.  It scales up: 92 x 1024 x 400 x 56 is four look-ups and a simple totting-up sum.  I can't even remember how to do that with long-multiplication.  As logarithms reduce complex multiplication to a set of sums, so division becomes a matter of subtraction.  Here's a fragment of the table of logs:
 Number Log10 Number Log10 2 0.301 6 0.778 3 0.477 7 0.845 4 0.602 8 0.903 5 0.669 9 0.954
See! It works:
2x2 = 4  and 0.301+0.301 = 0.602
2x4 = 8 and 0.301+0.602 = 0.903
3x3 = 9 and 0.477+0.477 = 0.954
6 / 3 = 2 and 0.778 - 0.477 =  0.301

Sorry chaps, you need to know this for later (like after Armageddon). I'll finish off with a an old joke:
The Ark comes to earth on Mt Ararat and Noah opens the doors.  As he lets out each pair of animals he says "Go forth and multiply".