This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients facundobatista, gvanrossum, jyasskin, mark.dickinson, rhettinger
Date 2008-01-12.01:47:44
SpamBayes Score 0.0013908758
Marked as misclassified No
Message-id <1200102466.63.0.367268529533.issue1682@psf.upfronthosting.co.za>
In-reply-to
Content
About .trim and .approximate:  

it sounds like these are different, but quite closely related, methods:  one takes a positive 
integer and returns the best approximation with denominator bounded by that integer;  the other 
returns the 'smallest' rational in a given interval centered at the original rational.  I guess 
we probably don't need both of these, but I can't give any good reason for preferring one over 
the other.

I don't have anything to offer about names, either.

I can try to find out whether the algorithms are published anywhere on the web---certainly, 
neither algorithm should be particularly hard to implement and prove the correctness of;  they 
both essentially rely on computing the continued fraction development of the given rational.  
Almost any not-too-basic elementary number theory text should contain proofs of the relevant 
results about continued fractions.

Am willing to help out with implementing either of these, if that's at all useful.
History
Date User Action Args
2008-01-12 01:47:46mark.dickinsonsetspambayes_score: 0.00139088 -> 0.0013908758
recipients: + mark.dickinson, gvanrossum, rhettinger, facundobatista, jyasskin
2008-01-12 01:47:46mark.dickinsonsetspambayes_score: 0.00139088 -> 0.00139088
messageid: <1200102466.63.0.367268529533.issue1682@psf.upfronthosting.co.za>
2008-01-12 01:47:45mark.dickinsonlinkissue1682 messages
2008-01-12 01:47:44mark.dickinsoncreate