(42S) Continuous Fractions
|
01-26-2020, 01:52 PM
Post: #1
|
|||
|
|||
(42S) Continuous Fractions
Let x be a real number. Then x can be represented by the fraction:
x = n_1 + 1/(n_2 + 1/(n_3 + 1/(n_4 + 1/(n_5 + ...)))) The above form is known as a continuous fraction, which can either have a finite set of terms or infinite set of terms. In short form, continuous fractions can be written in a vector form: x = [ n_1, n_2, n_3, n_4, n_5, ... ] If you are given a continuous fraction (n_1, n_2, etc.), you can calculate x with the following keystrokes, starting with the last term n_k and working left to n_1: RPN Calculators: 1. Start by entering n_k, then press [ 1/x ] 2. Loop: For each n_m for 1 < m < k: enter n_m, [ + ], [ 1/x ] 3. For n_1: Enter n_1, [ + ] Remember, we are working leftwards. The program CF for the HP 42S (and Swiss Micros DM42 and Free42 emulator) calculates the value of a continued fraction. Instructions: 1. Run CF ( [ XEQ ] (CF) ) 2. Enter n_k, press (LAST) 3. For each n_m for 1 < m < k, enter n_m, press (MID) 4. For n_1, enter n_1, press (1ST). You get the result. HP 42S/DM42/Free 42 Program CF: Code:
Blog Link: http://edspi31415.blogspot.com/2020/01/h...inued.html |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)