Re: Program to replace ->FRAC
[Prev][Next][Index][Thread]
Re: Program to replace ->FRAC
Some of us are lazy and don't know how to retype a TI83 program, could
you post a UUE of the TI85 version?
RC>There has been some discussion in the past about the limitations
RC>of the ->FRAC command on the TI-8x calculators. The main gripe
RC>about the command is that it limits denominators to a maximum
RC>of four digits.
RC>This program, N2FRAC, overcomes the four digit limitation but
RC>does have limits of its own. It's limit is a 10 digit numerator
RC>or denominator. Beyond 10 digits the number gets converted over
RC>to scientific notation. Because of this limitation the calculated
RC>fraction may only be a close approximation. If time permits an
RC>algorithm will be written to overcome the 10 digit limitation.
RC>N2FRAC will convert the number stored in the system variable Ans.
RC>The output is three numbers. The first number is the numerator,
RC>the second is the denominator, and the third is the calculated
RC>decimal value of the fraction. The third number was included
RC>only to compare the original decimal value with that of the
RC>fraction.
RC>The program is written for the TI-83 but can easily be typed in any of
RC>the TI-8x calcs.
RC>If you have any problems with this program or if you find a number
RC>it will not convert (within the 10 digit limit) please contact me
RC>at either:
RC>rhomard@juno.com or rcriasm@dwx.com
RC>Enjoy.
RC>Rick Homard
RC>\start83\
RC>\comment=Program file dated 06/26/97, 16:27
RC>\name=N2FRAC
RC>\file=
RC>Ans\->\X
RC>1\->\dim(L\1\
RC>1\->\J
RC>iPart(X\->\L\1\(J
RC>fPart(X\->\X
RC>While (round(X,9)\!=\0) and (J<16
RC>J+1\->\J
RC>X\^-1\\->\X
RC>iPart(X\->\L\1\(J
RC>fPart(X\->\X
RC>End
RC>L\1\(J\->\A
RC>1\->\B
RC>L\1\(J-1)A+B\->\C
RC>A\->\B
RC>C\->\A
RC>For(K,J-2,1,\(-)\1
RC>L\1\(K)A+B\->\C
RC>A\->\B
RC>C\->\A
RC>End
RC>Disp A,B,A/B
RC>\stop83\
RC>begin 664 n2frac.83p
RC>M*BI423@S*BH:"@!0<F]G<F%M(&9I;&4@9&%T960@,#8O,C8O.3<L(#$V.C(W
RC>M``````````"A``L`D@`%3C)&4D%#``"2`)``<@18/S$$M5T`/S$$2C^Y6`1=
RC>M`!!*/[I8!%@_T1`26"LY$6\P$4`02FLQ-C]*<#$$2C]8#`18/[E8!%T`$$H_
RC>MNE@$6#_4/S]=`!!*!$$_,01"/UT`$$IQ,1%!<$($0S]!!$(_0P1!/]-+*TIQ
RC>F,BLQ*[`Q/UT`$$L107!"!$,_001"/T,$03_4/]Y!*T(K08-"XB<`
RC>end