Home> urticator.net Search About This Site > Domains Glue Stories Computers Driving Games Humor Law Math > Numbers Science Powers and Fractions Notes About Squares Decimal Expansions Repeat Length Again Number Maze Primes Divisibility Intrinsic Nature of Primes Other Topics > Other Topics (2) Machine Language Pascal's Triangle Dead Reckoning > Exponentials Multiplication in Base 10 The Multiplication Table
Error Analysis 
Exponentials, ContinuedSo, now we know how to get the remainder into the range 0–0.1. That seems pretty good, but is it good enough? Let's look at the formula side of things and see. The exponential (base e) can be written as a nice power series.
e^{x} = sum ( x^{n}/n! ) That series isn't the only possible starting point for a formula, but it's the only one I'm going to talk about. It's simple, and converges rapidly, and is what we want to use. We can't use all the terms, of course, so we have to truncate the series at some point. But, if we truncate after the linear term, the range turns out to be way too small; and if we truncate after the cubic term, the formula turns out to be way too complicated; and that pretty well settles it. With a conversion factor for base 10 included, here's what we have.
10^{x} = e^{x ln 10} ~ e^{2.303x} ~ 1 + 2.303x + (2.303x)^{2}/2 Now, although I haven't said so in so many words, the goal here is to find a good inverse for the logarithm method, which provides results to five decimal places. So, since the argument x is a logarithm, we can assume it will be accurate to five places; but then, since the formula has a substantial linear term, the best we can hope for is that the result will be accurate to five places too. What does it mean to be accurate to five places? If I tell you that log 2 is .30103, you know that's within 5×10^{6} of the true value; so maybe if the result of the formula is within 5×10^{6} of the true value (10^{x}), it will be accurate to five places? Well, no. No matter how close the two numbers are, there's always some probability that they'll come out different when you round them to five places.
1.00000 49999 Still, requiring the error to be less than 5×10^{6} is a pretty good rule of thumb; let's go with that for now and worry about the details later. Then, working through the numbers, it turns out that the formula is valid out to x = 0.018 and a bit. So, surprise! The range 0–0.1 is not good enough, and we need to find a third piece. The simplest one that we haven't already used is log 3, which is .47712; but we already know how to dispose of multiples of 0.1, so we can think of it as roughly 0.077. Then, if we allow adding or removing one or two copies of that, that gives us the following table, just like the table for log 2 except that we don't need a grid to see how it works.
So, given a number in the range 0–0.1, we can add or remove copies of log 3 and get a remainder in the range 0–0.023. That's still not quite good enough, but now, fortunately, there's a trick we can do. Suppose the original number is 0.075. According to the current scheme, we should subtract 0.054 to get remainder 0.021, which is too large … but we could equally well subtract 0.077 to get remainder 0.002! That works perfectly; the formula, as it happens, is valid out to x = 0.018 too. So, by choosing the nearest number from the table instead of the next smallest, we can get the remainder into a range where the formula is valid. And there you have it! The detailed algorithm that I'll present in the next section may look different, but it's really just a rearranged and optimized version of what I've outlined here. In particular, the pieces and the formula are exactly the same. In case you're wondering, here are a few last details about the range.

See AlsoError Analysis @ September (2006) 