Post Reply 
newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
08-20-2017, 03:22 AM
Post: #40
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-11]
(08-19-2017 09:10 PM)The Shadow Wrote:  When I run ->Q on the golden ratio, I get (leaving out a lot of digits for brevity):


When I run my version on the golden ratio, I get:


It turns out those two values are equally precise, but yours has much higher values for the numerator and denominator - hence it is not an actual convergent, which translates into extraneous digits in the continued fraction.

I see. ->Q uses a simple algorithm of invert and take the fractional part. When the algorithm in ->Q doesn't find a good fraction, it keeps going with higher denominators until is reaches 2^63 limit, then exit with whatever fraction was working on at the moment. By your account, I think we could've ended the search a couple of steps earlier, when the fraction already represented the number exactly at the given precision. I'll investigate why it keeps going (that's what you meant by "overshooting"!! now I get it).

BTW, I fixed the overflow issue in IDIV2 (also affected IQUOT and MOD), will come out in the next update. Thanks for the report! (keep them coming).
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-11] - Claudio L. - 08-20-2017 03:22 AM

User(s) browsing this thread: 1 Guest(s)