Post Reply 
Companion program for Joe Horn’s continued fractions article
09-10-2023, 12:50 AM
Post: #6
RE: Companion program for Joe Horn’s continued fractions article
(09-09-2023 03:10 PM)dlidstrom Wrote:  Hi Joe! Thanks for chiming in and doing some stress tests!
Indeed it fails as it assumes the arrays are same length. I’ll need to think about a fix for those issues.

I hate to make your life more difficult, but another issue arises when the best fraction is one of the inputs. Sometimes your program returns that fraction, but other times not. For example:

Between 1.5 and 1.6, the simplest fraction is 3/2 (same as 1.5), which your program returns.
But between 1.8 and 1.9, the simplest fraction is 9/5, but your program returns 11/6.

In other words, the program should return EITHER the simplest fraction in the open interval (A, B), OR in the closed interval [A, B]. Right now it sometimes does the former and sometimes the latter.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Companion program for Joe Horn’s continued fractions article - Joe Horn - 09-10-2023 12:50 AM



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