{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nConsider a [[floating-point|RTKRSC3KPH]] system with base $\\beta$ and precision $p$.\nThe *machine epsilon* is\n$$\\varepsilon_{\\mathrm{mach}} = \\beta^{1-p},$$\nthe distance from $1$ to the next larger floating-point number.\nThe *unit roundoff* of the system with rounding to nearest is\n$$u = \\tfrac12 \\beta^{1-p}.$$\nSome authors call $u$ the machine epsilon instead.\n\n## Remarks\n\nExample: in IEEE binary64, $\\beta = 2$ and $p = 53$, so $\\varepsilon_{\\mathrm{mach}} = 2^{-52} \\approx 2.22 \\times 10^{-16}$ and $u = 2^{-53} \\approx 1.11 \\times 10^{-16}$.\nCheck: the floating-point numbers in $[1, 2)$ are $1 + k \\, 2^{-52}$ for $k = 0, 1, \\ldots, 2^{52} - 1$, so the successor of $1$ is $1 + 2^{-52}$.\nNon-example: the smallest positive floating-point number, about $4.9 \\times 10^{-324}$ in binary64, is not the machine epsilon; it measures the range, not the relative precision.\nIf $x$ lies in the range of normalized numbers and $\\mathrm{fl}(x)$ is the nearest floating-point number, then $\\mathrm{fl}(x) = x(1 + \\delta)$ with $\\abs{\\delta} \\le u$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "JA3QXVF2B8",
    "kind": "definition",
    "msc": [
      "65G50",
      "65Y04"
    ],
    "name": "Machine epsilon",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Machine_epsilon"
      }
    ],
    "tag": "JQBG1GT0XW",
    "uses": [
      "RTKRSC3KPH"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/JQBG1GT0XW/",
  "links": [
    {
      "field": "defines",
      "target": "JA3QXVF2B8"
    },
    {
      "field": "uses",
      "target": "RTKRSC3KPH"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/JQBG1GT0XW.md",
  "msc": [
    "65G50",
    "65Y04"
  ],
  "name": "Machine epsilon",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/JQB/JQBG1GT0XW.md",
  "status": null,
  "tag": "JQBG1GT0XW",
  "uri": "m2://JQBG1GT0XW",
  "url": "https://tamnd.github.io/math2/wiki/machine-epsilon-definition/",
  "writing": {
    "tag": "JQBG1GT0XW",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
