{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0E70M92FE3"
    },
    {
      "field": "uses",
      "target": "0JXTQ392ZM"
    },
    {
      "field": "uses",
      "target": "0PMY0YQYXX"
    }
  ],
  "body": "\n## Definition\n\nLet $x$ be a real number.\nPut $x_0 = x$ and $a_0 = \\lfloor x_0 \\rfloor$.\nFor $n \\ge 0$, if $x_n \\neq a_n$, put $x_{n+1} = \\dfrac{1}{x_n - a_n}$ and $a_{n+1} = \\lfloor x_{n+1} \\rfloor$. If $x_n = a_n$, the process stops.\nThe continued fraction expansion of $x$ is the [[simple continued fraction|06XF7BCFFJ]] $[a_0; a_1, a_2, \\dots]$, finite or infinite.\n\n## Remarks\n\nHere $\\lfloor y \\rfloor$ is the largest integer that is at most $y$. Since $0 \u003c x_n - a_n \u003c 1$, each $a_{n+1}$ with $n \\ge 0$ is a positive integer.\nFor example, $\\frac{43}{19} = [2; 3, 1, 4]$, and $\\sqrt{2} = [1; 2, 2, 2, \\dots]$.\nThe process stops if and only if $x$ is rational, by the [[termination theorem|0PMY0YQYXX]].\nFor a rational $x$, the steps are the steps of the [[Euclidean algorithm|0TRNT4X7J0]] on its numerator and denominator.\n\n## Explanations\n\n### L1 human\n\nTake the integer part of $x$, then flip the remaining fractional part, and repeat.\nThe integer parts that you collect are the terms of the continued fraction of $x$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "04VA28F3HB",
    "kind": "definition",
    "msc": [
      "11A55"
    ],
    "name": "Continued fraction expansion of a real number",
    "sources": [
      {
        "locator": "Calculating continued fraction representations",
        "url": "https://en.wikipedia.org/wiki/Simple_continued_fraction"
      }
    ],
    "tag": "0SJ7Z6VKWK",
    "uses": [
      "06XF7BCFFJ"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0SJ7Z6VKWK/",
  "links": [
    {
      "field": "defines",
      "target": "04VA28F3HB"
    },
    {
      "field": "uses",
      "target": "06XF7BCFFJ"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0SJ7Z6VKWK.md",
  "msc": [
    "11A55"
  ],
  "name": "Continued fraction expansion of a real number",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0SJ/0SJ7Z6VKWK.md",
  "status": null,
  "tag": "0SJ7Z6VKWK",
  "uri": "m2://0SJ7Z6VKWK",
  "url": "https://math2.tamnd.com/wiki/continued-fraction-expansion-of-a-real-number-definition/",
  "writing": {
    "tag": "0SJ7Z6VKWK",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
