{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "QWYQ3JNK0B"
    }
  ],
  "body": "\n## Summary\n\nAn algorithm is numerically stable when the errors it makes, such as [[round-off errors|CPN6SD3BTV]], are not amplified beyond what the problem itself forces.\nThe strongest common form is backward stability: the computed answer is the exact answer for a slightly perturbed input, as in [[backward error analysis|CMXHRNWY35]].\nA stable algorithm applied to a well-conditioned problem gives an accurate answer; for an ill-conditioned problem even a stable algorithm can give large errors.\nFor methods for differential equations, stability means instead that errors in the steps stay bounded, as checked by [[von Neumann stability analysis|2Z7NASDQB6]].\n\n## Explanations\n\n### L1 human\n\nTwo formulas can be equal in exact arithmetic but behave very differently on a computer.\nFor example, the roots of $x^2 - 10^8 x + 1 = 0$ are about $10^8$ and $10^{-8}$.\nThe textbook formula computes the small root as $(10^8 - \\sqrt{10^{16} - 4})/2$, a difference of two almost equal numbers, and loses most of its digits.\nThe equivalent formula $2/(10^8 + \\sqrt{10^{16} - 4})$ has no such subtraction and is accurate.\nThe second formula is a stable way to compute the small root and the first is not.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "65G50",
      "65F35"
    ],
    "name": "Numerical stability",
    "same_as": {
      "wikidata": "Q1430640",
      "wikipedia": "Numerical stability"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Numerical_stability"
      }
    ],
    "tag": "1AKB4XHMTH"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/1AKB4XHMTH/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/1AKB4XHMTH.md",
  "msc": [
    "65G50",
    "65F35"
  ],
  "name": "Numerical stability",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/1AK/1AKB4XHMTH.md",
  "status": null,
  "tag": "1AKB4XHMTH",
  "uri": "m2://1AKB4XHMTH",
  "url": "https://tamnd.github.io/math2/wiki/numerical-stability/",
  "writing": {
    "tag": "1AKB4XHMTH",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
