Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Does there exist a good reference on the algorithms used by calculators, especially on the trigonometric and transcendental functions?

I would still like to know how Casio generates its random numbers. I still wonder if they are any good.

share|improve this question
9  
1  
For fun... –  J. M. Dec 13 '10 at 8:58
    
Trig functions, probably lookup tables [to optimize?] or Taylor series approximations. –  muntoo Dec 14 '10 at 1:37

4 Answers 4

up vote 8 down vote accepted

I would recommend reading Gerald Rising's Inside your Calculator (which has a supplementary website); there is a nice discussion of the methods used by some calculators that is suitable at the undergraduate level.

Otherwise, to really figure out what methods they are using, it might help to search the technical notes of the manufacturer's websites. For instance, Texas Instruments has notes like this one on their "knowledge base" that discuss "what's under the hood", though not in detail of course. (Sometimes, hobbyist sites like this one also discuss calculator algorithms.)

share|improve this answer
    
As for "how Casio generates its random numbers", I'd speculate that it's using the simplest sort of algorithm: the linear congruential generator (LCG); it's pretty compact to be easily implemented in hardware. –  J. M. Dec 13 '10 at 3:04
    
Another thing I'd like to note on the arithmetic side: there are calculators, like those from TI and HP that internally store their numbers as binary coded decimal (BCD). That usually requires some finesse in manipulating, more than the usual representation of numbers in binary/hex. –  J. M. Dec 13 '10 at 8:55
    
Long ago Random numbers were latched from a CPU's dynamic refresh register and manipulated to whatever range was needed. –  Optionparty Nov 16 '13 at 16:41

See CORDIC. See also this question: http://stackoverflow.com/questions/2169641/where-to-find-algorithms-for-standard-math-functions/2169666 and this review: http://mathdl.maa.org/mathDL/19/?pa=reviews&sa=viewBook&bookId=65790

share|improve this answer
1  
As an additional note, there is a nice discussion of CORDIC in Jörg Arndt's [ Matters Computational ](jjj.de/fxt/fxtpage.html#fxtbook) ; it's a nice book for learning many computational tricks. –  J. M. Dec 13 '10 at 14:59

The GNU Multiple Precision Arithmetic Library (GMP) has a very good documentation describing how they implemented all the arithmetic functions for their multiple precision library:

http://gmplib.org/manual/

Give it a try!

UPDATE: I know the GMP is used for big number computation, but arithmetic is arithmetic, and to make big number computations you must understand small number computations, so I am sure (or at least "almost" sure) the documentation mention what is enough to for calculator arithmetic.

share|improve this answer
1  
But I doubt those are what I used in calculators. –  John Smith Dec 13 '10 at 3:09
    
I'm confused about the upvotes to this; it's a bit offtopic if you ask me... and not all the methods for arbitrary precision are appropriate for computing at the precision of a typical calculator. I certainly wouldn't use Karatsuba for multiplying small numbers... –  J. M. Dec 13 '10 at 3:10
    
John, J.M., yes, I know the GMP is used for big number computation, but arithmetic is arithmetic, and to make big number computations you must understand small number computations, so I am sure (or at least "almost" sure) the documentation mention what is enough to for calculator arithmetic. –  Rafid Dec 13 '10 at 7:06
    
I feel that it is better to include your comment in the answer so that people understand why you mentioned the multi-precision algorithms. –  Tsuyoshi Ito Dec 13 '10 at 12:32
    
OK, I updated my post. –  Rafid Dec 13 '10 at 14:51

The algorithms are typically common, but the implementation changes.
Early calculators like the HP-41 stored numbers in BCD format. Modern machines are more likely to use IEE-754 formats, in single or double precision.

For modern stuff, any math library should have what you want. For older formats, look for websites like the HP calculator Museum.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.