From: Zane Dodson Date: 2005-05-06T03:17:14+09:00 Subject: Re: Float to Rational Hello, On Fri, May 06, 2005 at 03:07:40AM +0900, Christoph wrote: | Florian G. Pflug schrieb: | | For serious use he'd probably better using "continued fractions" based | conversion algorithm (check out any googled side with this search term) | + error term | | def to_r(eps = 10**(-13)) | ... | end Knuth has a discussion of this in `Seminumerical Algorithms, The Art of Computer Programming, vol. 2.' In the third edition, it is in sec. 4.5.3 (pp. 356ff). See also exercise 4.5.3.2. Best regards, -- Zane Dodson