[vox-tech] Fwd: [OT] How do calculators work?

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Dec 2 18:41:12 PST 2006


Bill Kendrick wrote:
> Pete posted this from a non-subscribed address:
> 
> 
> Date: Fri, 1 Dec 2006 21:31:14 -0800
> From: Peter Salzman <p at cbreak.com>
> Subject: [OT] How do calculators work?
> To: vox-tech at lists.lugod.org
> 
> I've always heard that calculators use truncated Taylor series to
> approximate functions like trig and exp functions.
> 
> Yet that can't be the whole story:
> 
> Taylor approximations require more and more terms for convergence as you
> evaluate the series farther and farther away from the point of expansion.
> 
> Second, we get into problems with singularities and the radius of
> convergence.  The series converges on a complex disk (or a real interval)
> that contains no singularities.  That presents a major obstacle for
> calculating logarithms.  That's why you always expand log(x + k), rather
> than log(x).
> 
> So saying that calculators use power series approximations can't be the
> whole story.  It's a good zeroth order approxmation to the truth.  What's
> the first order correction to the truth?
> 
> Thanks!
> 
> Pete

It appears that CORDIC approximations are an effective solution. [1]

I had heard of them, but had never worked through them myself until
prompted by this question.  I still don't quite follow the theoretical
basis [2]. Tracy Allen's explanation [3] is helpful, but doesn't
address the application of the algorithm to logarithms and square roots.

-------

[1] http://www.jacques-laporte.org/TheSecretOfTheAlgorithms.htm
[2] http://www.jacques-laporte.org/Welther-Unified%20Algorithm.pdf
[3] http://www.emesystems.com/BS2mathC.htm

-- 
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------


More information about the vox-tech mailing list