J
John Larkin
Guest
On 25 Jun 2009 14:38:02 -0500, The Phantom <phantom@aol.com> wrote:
non-portability. Not so good as regards commenting, either.
John
Programmable-calculator routines are the ultimate in programmingOn Thu, 25 Jun 2009 12:22:44 -0700, John Larkin
jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:
How about starting with 1/1 and looping on...
if the fraction is below the target, bump the numerator
if above, bump the denominator
Wouldn't that work? A PC could do some decent fraction of a billion
iterations per second. Who needs elegance these days?
John
That's what CBFalconer's brute force program does. For finding fractions with
the small numerators and denominators this thread has been discussing, and using
a modern computer, brute force is just fine.
However, when doing the computations on a slow machine, such as a pocket
calculator, continued fraction methods may be enough faster to make the
difference between a boring wait and immediate answers.
non-portability. Not so good as regards commenting, either.
John