Lambda the Ultimate

inactiveTopic Continued Fraction Arithmetic - Bill Gosper
started 2/9/2001; 1:45:21 PM - last post 10/9/2002; 3:55:32 AM
Ehud Lamm - Continued Fraction Arithmetic - Bill Gosper  blueArrow
2/9/2001; 1:45:21 PM (reads: 1688, responses: 3)
Continued Fraction Arithmetic - Bill Gosper
(found via comp.lang.scheme)

This paper (you have to scroll down a bit) shows how and why to use continuted fractions for doing exact arithmetic on irrationals.

Why use algorithms that are at least twice as hard as the usual algorithms on numbers in positional notation (e.g. decimal or binary)? One answer is that many numbers, such as pi and e, can be represented exactly, using little programs (coroutines) to provide indefinitely many continued fraction terms on demand.

But the algorithms for sum, product, etc. of two such numbers have this same property, for they produce their output as they read their input. Thus we can cascade several of these routines so as to evaluate arithmetic expressions in such a way that output stream begins almost immediately, and yet can continue almost indefinitely. The user is freed from having to decide in advance just how much precision is necessary and yet not wasteful.

Quite a lot of math, so if that's not to your liking just skip this one. However those into numerical computation should enjoy it.

Notice that to use these techniques in a programming language, support for infinite streams or coroutines is needed.
Posted to general by Ehud Lamm on 2/9/01; 1:46:05 PM

Ehud Lamm - Re: Continued Fraction Arithmetic - Bill Gosper  blueArrow
8/3/2001; 4:36:53 AM (reads: 1542, responses: 1)
The current link is http://www.tweedledum.com/rwg/cfup.htm

Ehud Lamm - Re: Continued Fraction Arithmetic - Bill Gosper  blueArrow
8/3/2001; 5:11:54 AM (reads: 1600, responses: 0)
More information, and useful links, are on the XR - exact real arithmetic page.

vijaykumar - Re: Continued Fraction Arithmetic - Bill Gosper  blueArrow
10/9/2002; 3:55:32 AM (reads: 1031, responses: 0)
Dear sir,

using CONTINUED FRACTION ARITHMETIC.I am designing reciprocal operationIN HARDWARE i.e: Y= Ax+B -


Cx+D THEN A=0,B=1,C=1, D=0 Y= 1 / X.

SO, CAN YOU GIVE ME ANY CLUE FOR DESIGNING.

WATING FOR IMMIDIATE REPLY