(12C) Decimal to Fraction
|
08-08-2018, 07:04 PM
(This post was last modified: 08-08-2018 07:09 PM by Dieter.)
Post: #17
|
|||
|
|||
RE: (12C) Decimal to Fraction
(08-08-2018 06:05 PM)Thomas Klemm Wrote: Here's a program for the HP-11C: Fine, thank you very much. The translation for the 12C is a bit tricky since there are no subroutines. ;-) Anyway, this afternoon I managed to do a version for the 35s. Seems to work, but I think I have to do some more tests. For the given examples the results are the same as yours. For √2 and denominators up to 700 the program does calculate 816/577 as a solution, but since with 12 digit precision the error is the same as for 577/408 the latter is returned. I also would like use the program for the case where the approximation error is given, i.e. check whether the fraction agrees with the input when rounded to display precision. In a way it seems to work, but I'll have to take a closer look at this. ;-) Finally I wanted to suggest an improvement regarding the GSB 6 subroutine, but you noticed this yourself. Since both calls are preceded by an ENTER the latter can also be included in the subroutine itself (requires two ENTERs then). It even looks like this way LBL 4 could be replaced with LBL 6. But this doesn't seem to save more steps. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)