From: SourceForge.net <noreply@so...>  20070223 19:11:12

Bugs item #1667350, was opened at 20070223 14:11 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1667350&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: cf(sqrt(8)) wrong Initial Comment: makelist(cf(sqrt(8)),cflength,1,7) => [3, [2, 1, 4], [2, 1, 5], [2, 1, 4, 1, 4], [2, 1, 4, 1, 5], [2, 1, 4, 1, 4, 1, 4], [2, 1, 4, 1, 4, 1, 5]] There are two problems here. * The cflength=0 result is not a continued fraction at all, but cf(xxx) is always supposed to return a continued fraction, even for integers: cf(3) => [3]. * cflength=n is documented to mean that you get n periods. The period here is [1,4] (length 2), so the results should be [2,1,4], [2,1,4,1,4], [2,1,4,1,4,1,4] etc. compare makelist(cf(sqrt(3)),cflength,1,7); => [[1, 1, 2], [1, 1, 2, 1, 2], [1, 1, 2, 1, 2, 1, 2], ... Same problem with cf(sqrt(32)), cf(sqrt(27)), etc. On the other hand, cf(2^(3/2)) etc. does NOT cause this problem. By the way, cflength gives you 1 period, not 0....  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1667350&group_id=4933 