Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    \$\begingroup\$ Does the output have to be in the same format as the test cases? \$\endgroup\$ Commented Jun 18, 2012 at 7:36
  • \$\begingroup\$ No. As long as you have the semicolons, it's fine. \$\endgroup\$ Commented Jun 18, 2012 at 20:30
  • \$\begingroup\$ Hm, getting the right answers, having trouble knowing when the fraction is rational to stop. Is it really as simple as when a<sub>0</sub> is double the sqrt of the original input? \$\endgroup\$ Commented Jun 21, 2012 at 18:28
  • \$\begingroup\$ Yep, that's the limit. \$\endgroup\$ Commented Jun 22, 2012 at 5:27
  • \$\begingroup\$ @beary605 thanks. Been doing a lot more reading, and now I see that the continued fraction of a square root is a bit of a special case. Fascinating stuff! Still working on a non-floating point version. \$\endgroup\$ Commented Jun 22, 2012 at 12:35