Post Reply 
The Four Meanings of "Accurate to 3 Places"
12-30-2017, 08:10 PM
Post: #5
RE: The Four Meanings of "Accurate to 3 Places"
This recursion is basically x=1/[1/x] where [] means floor is called the Gauss Map. It drifts rather quickly because the error in continued fraction approximation (p/q) is of order 1/q^2 (actually much better). The accuracy of the continued fraction part quickly exceeds the floating point precision of the calculator. The algorithm's greatest strength (good accuracy) tends to make it tricky.

Try with Sqrt(2) which has the continued fraction (1;2,2,2,2...) where the semicolon separates the first (or integer) part from the fraction. When done with symbolic arithmetic, it works fine. When done in floating point, the computation deteriorates.

HP50g program

<< INV DUP FLOOR DUP UNROT - EVAL>>

Sqrt(2) gives 0,1,2,2,2....
Sqrt(2.) gives the same but then after 15 steps or so deteriorates.


Exact mode works well for algebraic stuff. Floating point is always tricky.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: The Four Meanings of "Accurate to 3 Places" - ttw - 12-30-2017 08:10 PM



User(s) browsing this thread: 1 Guest(s)