# TITLE: Repeating Decimal to Fraction Conversion # AUTHOR: Roy F.A. Maclean # This is a shortened version of the program by Ian Klassen at http://www.brianhetrick.com/casio/hidetake/fracik.txt # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 17Dec1995, 3Feb1997, 13Jan2000, 18Jan2000, 27Oct2006 # MAKE: CASIO # MODEL: Any # SIZE: 27 # NOTES: There are two versions of this program. # If your calculator does not have a [ab/c] button # then type in program areas 2 and 0 # otherwise just use area 1. # # If you want to know the fraction for # 0.123123123123 # then enter 0.123 at the first prompt and # enter 3 at the period prompt. # If you want to know the fraction for # 0.123001230012300 # then do same as above but with period 5. # When program is run and fraction is displayed then # pressing the fraction button will alternate between the # decimal and fractional representation. # % represents the fraction symbol from the [ab/c] button @@ Program 1 ?->A:"P"?->P 10^P-1 (Int (A Ans+1))%Ans @@ Program 2 ?->A:"P"?->P 10^P-1->T Int (AT+1)->S S->X:T->Y Prog 0 "NUMERATOR" S/X_ "DENOMINATOR" T/X @@ Program 0 1->A~B:0->C~D Lbl 1 Int (X/Y) X-AnsY->R A-AnsD->E C-AnsB->F D->A:B->C:E->D F->B:Y->X:R->Y Y<>0=>Goto 1