PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: High Entry average rating: No information on entry rating
[parent] method for computing simple continued fractions with the aid of calculator and pencil and paper (Algorithm)

In most computer algebra systems, there is often a simple command for obtaining the continued fraction of a number, be it a rational number or an irrational number.

But with the aid of a scientific calculator, a software calculator or perhaps even a basic pocket calculator, one can calculate some continued fractions, though with some caveats about possible loss of precision.

For this method, one needs some way of calculating a reciprocal. On a scientific calculator, there usually is a key labeled ``1/x''. If there isn't, but there is a key for the displayed answer (such as on 2-line scientific calculators) one can then use ``1 / ANS''. A workaround on a limited basic calculator is possible if the calculator has user-accessible memory registers.

Before starting, it might be a good idea to decide on a value to stop at if the pattern for a periodic continued fraction does not make itself apparent. If one knows in advance the continued fraction is neither periodic nor terminating, one should then decide on a stopping value, preferably before loss of precision sets in.

This method is for non-integers. Starting with the number currently displayed, the method is as follows:

  1. If there is an integer portion to the number, subtract it and write it down on a sheet of paper.
  2. Calculate the reciprocal of this number.
  3. If the result is an integer, then the method is done. Likewise if one notices a pattern to the continued fraction. Otherwise, go back to step 1 with the number on the display.

For example, let's say we wish to compute the continued fraction of the square root of 3, $\sqrt{3}$ , using the Windows Calculator in scientific mode. 3 ^ (1 / 2) = gives us 1.7320508075688772935274463415059.

  1. We subtract the 1 and write it down, leaving 0.73205080756887729352744634150587 on the display.
  2. The reciprocal of that number is 1.3660254037844386467637231707529.
  3. We subtract the 1 and write it down, leaving 0.36602540378443864676372317075294 on the display.
  4. The reciprocal of that number is 2.7320508075688772935274463415059.
  5. We subtract the 2 and write it down, leaving 0.73205080756887729352744634150587 on the display.
  6. The reciprocal of that number is 1.3660254037844386467637231707529.
  7. We subtract the 1 and write it down, leaving 0.36602540378443864676372317075294 on the display.
  8. The reciprocal of that number is 2.7320508075688772935274463415059.
  9. We subtract the 2 and write it down. At this point it seems obvious that after the integer part, this continued fraction simply repeats 1 and 2 periodically. A couple more iterations support this assumption.

Of course the possible loss of precision in floating point arithmetic can cause this method to give erroneous or misleading answers. The continued fraction of $\sqrt{47}$ seems misleadingly to have an excessively long period with this method carried out on a CVS-brand scientific calculator. Similarly, a continued fraction from the first 25 prime numbers was constructed on that same calculator, giving the displayed value of 2.31303673. Application of this method recovered the first eight primes followed by 21.




"method for computing simple continued fractions with the aid of calculator and pencil and paper" is owned by PrimeFan.
(view preamble | get metadata)

View style:


This object's parent.
Log in to rate this entry.
(view current ratings)

Cross-references: application, prime numbers, period, arithmetic, support, iterations, integer part, obvious, point, mode, Windows Calculator, square root of 3, integer, terminating, periodic, periodic continued fraction, decide, reciprocal, calculate, even, calculator, scientific calculator, irrational number, rational number, number, continued fraction, simple, computer algebra systems

This is version 1 of method for computing simple continued fractions with the aid of calculator and pencil and paper, born on 2007-08-24.
Object id is 9887, canonical name is MethodForComputingSimpleContinuedFractionsWithTheAidOfCalculatorAndPencilAndPaper.
Accessed 1868 times total.

Classification:
AMS MSC11A55 (Number theory :: Elementary number theory :: Continued fractions)
 11J70 (Number theory :: Diophantine approximation, transcendental number theory :: Continued fractions and generalizations)
 11Y65 (Number theory :: Computational number theory :: Continued fraction calculations)

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add example | add (any)