Re: [MATHEDCC] Calculators and Fractions

Kevin L. Broussard (broussard@SISKIYOUS.EDU)
Mon, 06 Oct 1997 14:10:00 -0700

Geoff Hagopian wrote:

>Lawrence G. Gilligan wrote:
>
>> I hate to spoil all the fun but most TI, Casio, and HP calculators
>> already have a "convert-to-fraction" key. I know for certain that the TI-82,
>> TI-83, TI-85, TI-86 and TI-92 are models with that capability. The
>> limitations on conversion usually fall around 1000+ for the denominator.
>
>The fun for me is in discovering an algorithm which will do this with a given
>N-digit decimal. After all, that's what we're all paying $$ for, so it must be
>a valuable skill. Let's see. If there's an obvious repetend like, say
>2345.2345... repeating, then the infinite geometric series formula applies: (in
>this case) 2345*sum(10^(-4n),n,1,inf) = 2345*(1/(1-10^-4) is an integer ratio.
>At this the Euclidean algorithm can be used to find the gcf and reduce to
lowest
>terms.
>
>Considering that the first digits in the decimal are not necessarily part
of the
>repetend, I wonder what guessing games are played finding ratios when the
>repetend is more than half N and or doesn't appear until after the first [N/2]
>digits? Any deep throat from Tandy on the list?
>
>G Hagopian

Well...

If the number were in integer or fixed-point format, it would be easy. (I'm
speaking of the binary representation inside the calculator.) Just interpret
the decimal as a fraction (with a power of 2 in the denominator) and reduce
it. Of course, this would only give you fractions with denominators which
were powers of 2...

I suspect that there may be a limit to the size of the denominator. For
example, if you want your calculator to be able to convert decimals to
fractions up to denominators of 1000, simply multiply by successive whole
numbers until either 1) an integer is obtained, at which point you can
reduce the implied fraction, or 2) you pass 1000, at which point you can
give up. Note that this method would actually handle many composite
denominators over 1000, but no primes over 1000.

Now if you could be certain of the repetend, there is an alternative to the
geometric sequence. For example:

If x = 487.6473032032032032...

and you are certain that 032 is repeating, you can then say...

1000x = 487647.3032032032032...

and 1000x - x = 487647.3032032032032... - 487.6473032032032032...

that is, 999x = 487159.6559 exactly.

So 9990000x = 4871596559, or x = 4871596559/9990000.

Then reduce. I do this a lot on rainy days. Or not.

Kevin Broussard broussard@siskiyous.edu
College of the Siskiyous
800 College Avenue
Weed, CA 96094

****************************************************************************
* To post to the list: email mathedcc@archives.math.utk.edu *
* To unsubscribe, send mail to: majordomo@archives.math.utk.edu *
* In the mail message, enter ONLY the words: unsubscribe mathedcc *
* Words in the Subject: line are NOT processed! *
* Archives at http://archives.math.utk.edu/hypermail/mathedcc/ *
****************************************************************************