{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nThe *IEEE 754 standard* is the technical standard for [[floating-point arithmetic|RTKRSC3KPH]] of the Institute of Electrical and Electronics Engineers.\nIts main requirements are the following.\n\n1. Formats: a format has a base $\\beta \\in \\set{2, 10}$, a precision $p$ and an exponent range $[e_{\\min}, e_{\\max}]$ with $e_{\\min} = 1 - e_{\\max}$. The formats binary32 and binary64 have $(p, e_{\\max}) = (24, 127)$ and $(53, 1023)$.\n2. Special values: each format contains $+0$ and $-0$, $+\\infty$ and $-\\infty$, NaN (\"not a number\") values, and [[subnormal numbers|DHXXSN12JC]].\n3. Encoding: a binary64 number has $1$ sign bit, $11$ bits of biased exponent (bias $1023$) and $52$ bits of fraction. The leading significand bit of a normalized number is implicit.\n4. Correct rounding: the operations $+$, $-$, $\\times$, $/$, square root and fused multiply-add must return the exact result [[rounded|5NPVX29Y0C]] by the current rounding mode.\n5. Rounding modes: the default is round to nearest with ties to even. The other modes are ties away from zero and directed rounding toward $0$, $+\\infty$ and $-\\infty$.\n\n## Remarks\n\nExample: the decimal number $1$ in binary64 has sign bit $0$, biased exponent $0 + 1023 = 1023$ and fraction bits all $0$.\nNon-example: an arithmetic that always computes $x + y$ by chopping the extra digits does not meet clause 4, since in the default mode the result must be rounded to nearest.\nIn binary64 the largest finite number is $(2 - 2^{-52}) \\times 2^{1023} \\approx 1.8 \\times 10^{308}$, and the smallest positive normalized number is $2^{-1022}$.\nAn overflowing result is rounded to $\\pm\\infty$ under round to nearest, and an invalid operation such as $0/0$ or $\\sqrt{-1}$ returns NaN.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "GNDWPYYFW4",
    "kind": "definition",
    "msc": [
      "65Y04",
      "65G50"
    ],
    "name": "IEEE 754 standard",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/IEEE_754"
      }
    ],
    "tag": "PSNW0ZQ0E9",
    "uses": [
      "RTKRSC3KPH",
      "5NPVX29Y0C",
      "DHXXSN12JC"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/PSNW0ZQ0E9/",
  "links": [
    {
      "field": "defines",
      "target": "GNDWPYYFW4"
    },
    {
      "field": "uses",
      "target": "RTKRSC3KPH"
    },
    {
      "field": "uses",
      "target": "5NPVX29Y0C"
    },
    {
      "field": "uses",
      "target": "DHXXSN12JC"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/PSNW0ZQ0E9.md",
  "msc": [
    "65Y04",
    "65G50"
  ],
  "name": "IEEE 754 standard",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/PSN/PSNW0ZQ0E9.md",
  "status": null,
  "tag": "PSNW0ZQ0E9",
  "uri": "m2://PSNW0ZQ0E9",
  "url": "https://tamnd.github.io/math2/wiki/ieee-754-standard-definition/",
  "writing": {
    "tag": "PSNW0ZQ0E9",
    "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
      }
    ]
  }
}
