[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

475.0. "rational approximations" by SIERRA::OSMAN (and silos to fill before I feep, and silos to fill before I feep) Wed Apr 30 1986 19:08

    473.2 mentions "rational approximations".
    
    I recall reading in Bill Gosper's "continued fractions" article
    in "Hakmem" (MIT Artificial Intelligence Memo # 239) that the
    best rational approximations for a real number can be obtained
    from continued fraction computation of the real number.
    
    For instance, PI is approximately 
    
    	3 + 1/7
    
    so "best" approximation of pi at this level is 22/7.
    
    Further examination reveals that PI is more precisely
    
    	3 + 1/(7+1/16)
    
    This more accurate continued fraction yields a "best"
    approximation for PI of 355/113.
    
    To keep going, you would figure out that PI is actually closer to
    
    	3 + 1/(7+1/(16+1/???))
    
    and produce a better fraction.
    
    /Eric
T.RTitleUserPersonal
Name
DateLines
475.1How to do itMODEL::YARBROUGHTue Nov 25 1986 16:467
I you need this kind of thing, MAPLE has the operation built-in:

	convert(N,confrac,convergents);

will produce two arrays: the value of the function is a set of continued-
fraction denominators for N, while "convergents" gets assigned the
approximating rationals at each stage.