(12C) Decimal to Fraction
|
08-07-2018, 07:10 PM
Post: #11
|
|||
|
|||
RE: (12C) Decimal to Fraction
(08-07-2018 06:28 PM)Joe Horn Wrote: It gets the best possible answer even if it's NOT one of the principal convergents of the continued fraction, and does so very quickly. The RPL listing (linked above) is fully commented. But it's still RPL. For me one of the most obscure programming languages ever. #-) I tried to understand the code in the .SRC file... but without success. So I would like to ask if you could provide the algorithm in a different (more readable) way. I did some tests on the 12C and some cases seem to work – while others don't. BTW, I tried the "e" example in the textfile, with denominators up to 20. You said the 32s and 48 returned 19/7 while 49/18 is a (slightly) better match. Actually this is what the 35s displays, so it obviously uses the newer, upgraded algorithm. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)