Calculating with large numbers (moved)


[Prev][Next][Index][Thread]

Calculating with large numbers (moved)



Continuing the discussion of the ability of the TI-92 to work with large
numbers, moved over to this list from the TI-GRAPH list because of the
shifting focus:

A problem I have been working on is identifying commensurate powers of the
bases 2 and 3. The familiar example is 2^3 (8) and 3^2 (9) which are close
(only  differing by 1) in an absolute sense.  The powers 2^8 (256) and 3^5
(243) are closer in a _relative_ sense, however, and in fact agree in the first
digit of their decimal expansions.  The powers 2^24727 and 3^15601 agree in
their first five digits (this can be shown with logarithms).

In general, we want to find pairs of integers (p,q) such that the ratio 2^p/3^q
is close to 1. The floating point routines on the TI-86 can be used to quickly
find the pair (301994,190537), where the corresponding powers seem to agree to
twelve places. One would hope to be able to do better with the TI-92 (and by
extension the TI-89).

This is a dead end, however, as the floating-point calculation capabilities of
the TI-92 do not exceed (and perhaps do not equal) those of the TI-86. I had
given upon improving on the TI-86 result above until it occurred to me to work
in extended-precision mode on the TI-92, using lists to represent long decimal
expansions. After some work, I was able to develop a program to calculate the
logarithm of a given number to an arbitrary number of decimal places, and, with
patience, develop 20-place representations of ln(2) and ln(3).  A second
program then can be used to operate on these representations to develop
fractional approximations to their ratio, which is what we want.  These
programs could also have been written (though not so compactly) on the TI-86,
and perhaps even on the TI-83, though the lack of such programming amenities as
local variables would have made things very, very tight!

One fruit of this effort is the pair (16786921,10590737). The corresponding
decimal expansions are over five million digits in length. The problem is to
determine to how many initial digits the expansions agree. At the moment I
cannot think of a way to investigate this problem.  The TI-92 reports the
numbers 2^p and 3^q in this case as being equal. I will put this out to the
list here as a bit of a challenge: just how close are these numbers?

And when you finish answering this question, try tackling the final, and best,
pair I was able to derive from my 20-place expansions, which is
(228407084113122,144108825293471).   :-)}

RWW Taylor
National Technical Institute for the Deaf
Rochester Institute of Technology
Rochester NY 14623

>>>> The plural of mongoose begins with p. <<<<