{
  "errors": {
    "Overflow()": "0x35278d12",
    "DivisionByZero()": "0x23d359a3",
    "OutOfRange()": "0x7db3aba7"
  },
  "ops": [
    {
      "object": "FP19",
      "name": "add",
      "signature": "add(int256,int256)",
      "selector": "0xa5f3c23b",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a + b, rounded once (half up on the magnitude). The result is exact whenever it is representable; a - a is +0.",
      "domain": "any two numbers",
      "reverts": "Overflow() when the sum does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "sub",
      "signature": "sub(int256,int256)",
      "selector": "0xadefc37b",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a - b, rounded once. Exact whenever representable (Sterbenz: always for b/2 <= a <= 2b).",
      "domain": "any two numbers",
      "reverts": "Overflow() when the difference does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "mul",
      "signature": "mul(int256,int256)",
      "selector": "0xbbe93d91",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a * b: the 474-bit product of the significands, rounded once.",
      "domain": "any two numbers",
      "reverts": "Overflow() when the product does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "div",
      "signature": "div(int256,int256)",
      "selector": "0x43509138",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a / b: floor(ma 2^255 / mb) by one exact 512-by-256 division, rounded once.",
      "domain": "b != 0",
      "reverts": "DivisionByZero() for b == 0; Overflow() when the quotient does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "sqrt",
      "signature": "sqrt(int256)",
      "selector": "0x665df460",
      "inputs": [
        "x"
      ],
      "notice": "sqrt(x): the significand shifted to an even exponent, its integer square root at 2^136 (Newton: the word root of the top 256 bits, one residual step in a word, corrected by squaring), rounded once. Never overflows or underflows.",
      "domain": "x >= 0",
      "reverts": "OutOfRange() for x < 0 or a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "exp",
      "signature": "exp(int256)",
      "selector": "0xe46751e3",
      "inputs": [
        "x"
      ],
      "notice": "e^x = 2^(x log2 e): the 512-bit product of the significand and log2 e in two words (2^-508), split into the integer part and a fraction at 2^-254, then the 2^f kernel (within 6.1 units of 2^-254) and one rounding when that bound clears the rounding boundary, else e^r - 1 in two words for r = x - k ln 2: correctly rounded. Below 2^-118, 1 + x + x^2/2 floored exactly on the 2^-254 grid (the cubic only breaks ties) and rounded once; a positive x whose lowest bit is 2^-118, below 2^-84, makes that sum an exact tie the kernel cannot see past, so it takes the same path. Exactly one below 2^-238; zero below about -181,700.",
      "domain": "x < 2^18",
      "reverts": "Overflow() when e^x does not fit (x above about 181,705); OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "ln",
      "signature": "ln(int256)",
      "selector": "0x8e6f2353",
      "inputs": [
        "x"
      ],
      "notice": "ln(x) = (E - bias + log2(M / 2^236)) ln 2: the exponent exactly, the mantissa through the log2 kernel at 2^-254, the sum scaled to fill a word, one product with ln 2 and one rounding when its 5 units clear the rounding boundary, else u ln 2 + ln(mantissa) in two words (one Newton step on the kernel's value): correctly rounded. Within 2^-8 of one, d = x - 1 is exact and ln(1 + d) = d * (ln 2/2)(1 - y) P(y^2), y = d/(2 + d), at 2^-254 (in two words when needed), so the relative precision holds all the way down.",
      "domain": "x > 0",
      "reverts": "OutOfRange() for x <= 0 or a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "pow",
      "signature": "pow(int256,int256)",
      "selector": "0x92b0c5b2",
      "inputs": [
        "x",
        "y"
      ],
      "notice": "x^y = 2^(y log2 x): log2 x as a scaled word from the kernel (or the near-one series), its exact 512-bit product with y's significand split into the integer part and a fraction at 2^-254, then the 2^f kernel; one rounding when the error bound (which grows with |y| or |t|) clears the rounding boundary, else the middle stage: log2 x within 2^-272 (mid254.py), t exact from it and the same 2^f kernel, its bound 10 units whatever |y|; else an exact tie when x^y has at most 238 bits, else log2 x in two words (wln) times y and 2^f by wexpm1: correctly rounded. 0^0 = 1. Shortcuts for y in {1, 2, 1/2, -1}.",
      "domain": "x >= 0",
      "reverts": "OutOfRange() for x < 0; DivisionByZero() for 0^y with y < 0; Overflow() when the result does not fit"
    },
    {
      "object": "FP19E",
      "name": "log1p",
      "signature": "log1p(int256)",
      "selector": "0x8552a5b0",
      "inputs": [
        "x"
      ],
      "notice": "ln(1 + x) without forming a rounded 1 + x. Below 2^-4, x times ln(1 + x)/x = (ln 2/2)(1 - y) P(y^2), y = x/(2 + x), at 2^-254 (P the kernel's minimax polynomial below 2^-8, a wider one above), so the relative precision holds all the way down; above, 1 + x exactly on a 2^-254 grid under its leading bit, the log2 kernel and one product with ln 2. Each fast value carries its error bound; when it reaches the rounding boundary the series or ln(1 + x) is recomputed in two words. Correctly rounded.",
      "domain": "x > -1",
      "reverts": "OutOfRange() for x <= -1 or a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "expm1",
      "signature": "expm1(int256)",
      "selector": "0x973fe005",
      "inputs": [
        "x"
      ],
      "notice": "e^x - 1 without cancellation. Below 2^-8, x times (e^x - 1)/x from its minimax polynomial at 2^-254; above, exp's split of x log2 e and its unrounded 2^f, with the one subtracted on the same 2^-254 grid; each within its bound, recomputed in two words when that reaches the rounding boundary. Correctly rounded; -1 below about -176.",
      "domain": "x < 2^18",
      "reverts": "Overflow() when e^x - 1 does not fit (x above about 181,705); OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19S",
      "name": "erf",
      "signature": "erf(int256)",
      "selector": "0x7a959e36",
      "inputs": [
        "x"
      ],
      "notice": "The error function. Below 1/2, x (2/sqrt pi) e^(-x^2) times the all-positive series sum (2x^2)^k / (2k+1)!!; above, 1 - erfc with erfc = e^(-x^2) g(x) from the anchors or the continued fraction (see erfc). e^(-x^2) comes from the exact square. One rounding when the fast value's error bound clears the rounding boundary, else the series in two words below 7 and 1 - erfc by the continued fraction in two words above: correctly rounded. +-1 from |x| >= 13.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19S",
      "name": "erfc",
      "signature": "erfc(int256)",
      "selector": "0xa79456da",
      "inputs": [
        "x"
      ],
      "notice": "The complementary error function as a product, never a difference, for x >= 1/2: erfc(x) = e^(-x^2) g(x), g = e^(x^2) erfc from a Taylor series around 45 anchors on [1/2, 6] and the continued fraction above, e^(-x^2) from the exact 474-bit square, so the tail keeps 71 digits until it underflows 2^-262142 near x = 427. 1 - erf below 1/2, 2 - erfc(-x) below zero. One rounding, or the wide second stage (the series and 1 - erf below 7, the continued fraction above, in two words) when the fast value's error bound reaches the rounding boundary: correctly rounded.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19S",
      "name": "normCdf",
      "signature": "normCdf(int256)",
      "selector": "0x7b9745a0",
      "inputs": [
        "x"
      ],
      "notice": "The standard normal distribution function Phi(x) = erfc(-x / sqrt 2) / 2, with e^(-x^2/2) from the exact square, so the left tail keeps 71 digits until it underflows near x = -603 (the 18-decimal grid is empty from about -8.3); one rounding, or erf's wide second stage at y = |x| / sqrt 2: correctly rounded; exactly one from x >= 13 sqrt 2.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19S",
      "name": "lambertW0",
      "signature": "lambertW0(int256)",
      "selector": "0x6de23d34",
      "inputs": [
        "x"
      ],
      "notice": "The principal branch of Lambert W, W(x) e^W(x) = x, W >= -1. Below 1 + e x = 1/8 (x < -0.322) the unknown is q = 1 + W on (q - 1) e^q + 1 = 1 + e x, with 1 + e x exact: the seed p S(p), p = sqrt(2 (1 + e x)), S a degree-16 fit (2^-44.8), and one sixth-order step with e^q - 1 from the wide exp kernel, whose error is 5 units of 2^-254 whatever q, so the branch point costs no precision; one rounding when that clears the rounding boundary. Elsewhere x (1 - x + 3x^2/2) or Winitzki's seed from a crude logarithm, fourth-order log-form steps at 2^-126 (one or two, with a table-driven logarithm) and one at word precision with a bound (no e^w, so the whole range up to W = 181,700 works), tested the same way. On a miss one Newton step at 2^-510 (the residual in three words) and one rounding: correctly rounded. W rounds to x below 2^-238.",
      "domain": "x >= -1/e",
      "reverts": "OutOfRange() below -1/e or for a word that is not a number"
    },
    {
      "object": "FP19S",
      "name": "lambertWm1",
      "signature": "lambertWm1(int256)",
      "selector": "0xae94abc8",
      "inputs": [
        "x"
      ],
      "notice": "The secondary real branch of Lambert W, W(x) <= -1. Below 1 + e x = 1/8 (x < -0.322) as lambertW0 in q = 1 + W (negative here); above, the asymptotic seed L - ln(-L) + ln(-L)/L, L = ln(-x), from the crude logarithm, lambertW0's fourth-order log-form steps (one to three at 2^-126, one at word precision; no e^w: W reaches about -181,700 at the bottom of the format), its rounding test and, on a miss, its Newton step at 2^-510: correctly rounded.",
      "domain": "-1/e <= x < 0",
      "reverts": "OutOfRange() outside that or for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "powu",
      "signature": "powu(int256,int256)",
      "selector": "0xb8846d69",
      "inputs": [
        "x",
        "n"
      ],
      "notice": "x^n for |n| below 2^16 by binary exponentiation on a 256-bit significand with its own exponent, each product keeping its top 256 bits, rounded once at the end: exact whenever x^n fits 256 bits (so every exactly representable power and every exact tie), else within (2n + 8) units, and through pow's middle stage when that reaches the rounding boundary. n < 0 inverts the final significand once. From 2^16 on, pow(|x|, n) with the sign restored. Correctly rounded for |n| < 2^237 (n is a number from there). 0^0 = 1.",
      "domain": "any number x, any plain integer n (not a number); the result must fit",
      "reverts": "Overflow() when x^n does not fit; DivisionByZero() for 0^n with n < 0; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "compound",
      "signature": "compound(int256,int256)",
      "selector": "0xa31e7db8",
      "inputs": [
        "rate",
        "n"
      ],
      "notice": "(1 + rate)^n without forming a rounded 1 + rate (a per-second rate needs 266 bits for it): log2(1 + rate) unrounded, as log1p takes it (the series below 2^-4, 1 + rate exact under its leading bit above), its exact product with n, then pow's 2^t; one rounding when its error bound clears the rounding boundary, else the middle stage as pow's (log2(1 + rate) within 2^-272, its bound 10 units whatever |n|), else an exact tie when the power has at most 238 bits, else log2(1 + rate) in two words times n exactly: correctly rounded.",
      "domain": "rate >= -1, any plain integer n (not a number); the result must fit",
      "reverts": "OutOfRange() for rate < -1; DivisionByZero() for rate = -1 with n < 0; Overflow() when the result does not fit"
    },
    {
      "object": "FP19",
      "name": "neg",
      "signature": "neg(int256)",
      "selector": "0x54a53dc1",
      "inputs": [
        "x"
      ],
      "notice": "-x: the sign bit flipped; -0 is 0.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "abs",
      "signature": "abs(int256)",
      "selector": "0x1b5ac4b5",
      "inputs": [
        "x"
      ],
      "notice": "|x|: the sign bit cleared.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "sign",
      "signature": "sign(int256)",
      "selector": "0xae610b48",
      "inputs": [
        "x"
      ],
      "notice": "-1, 0 or 1 as numbers.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "cmp",
      "signature": "cmp(int256,int256)",
      "selector": "0xc688366a",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "-1, 0 or 1 as plain integers: the order of a and b.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "lt",
      "signature": "lt(int256,int256)",
      "selector": "0x30880038",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "1 if a < b, else 0, as a plain integer.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "eq",
      "signature": "eq(int256,int256)",
      "selector": "0xaa2c45bf",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "1 if a == b, else 0. Representations are unique, so this is bit equality.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "fromUint",
      "signature": "fromUint(uint256)",
      "selector": "0xe3814b19",
      "inputs": [
        "x"
      ],
      "notice": "The number x, exact below 2^237, rounded once above.",
      "domain": "any x",
      "reverts": "never"
    },
    {
      "object": "FP19",
      "name": "fromFP127",
      "signature": "fromFP127(int256)",
      "selector": "0x736c53c3",
      "inputs": [
        "x"
      ],
      "notice": "The number x / 2^128: exact whenever |x| has at most 237 significant bits (every |x| below 2^237, and larger ones with trailing zeros), rounded once otherwise.",
      "domain": "any 127.128 word",
      "reverts": "never"
    },
    {
      "object": "FP19",
      "name": "toFP127",
      "signature": "toFP127(int256)",
      "selector": "0x7c90b7f9",
      "inputs": [
        "x"
      ],
      "notice": "The 127.128 word nearest to x, half up on the magnitude: zero below 2^-129, one raw unit from there to 2^-128.",
      "domain": "|x| < 2^127",
      "reverts": "Overflow() at or above 2^127 (-2^127 is allowed); OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "fromFixed18",
      "signature": "fromFixed18(int256)",
      "selector": "0x9aea0a13",
      "inputs": [
        "x"
      ],
      "notice": "The number x / 10^18: the integer as a number (exact below 2^237), divided by 10^18 with one rounding.",
      "domain": "any 18-decimal word",
      "reverts": "never"
    },
    {
      "object": "FP19",
      "name": "toFixed18",
      "signature": "toFixed18(int256)",
      "selector": "0xa2745c74",
      "inputs": [
        "x"
      ],
      "notice": "The 18-decimal word nearest to x, half up on the magnitude, from the exact 512-bit product M 10^18.",
      "domain": "|x| 10^18 < 2^255",
      "reverts": "Overflow() when x 10^18 does not fit int256; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "mulDown",
      "signature": "mulDown(int256,int256)",
      "selector": "0x4b8d10e0",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a * b rounded toward minus infinity: the largest number at or below the exact product (the 474-bit product of the significands and a sticky bit). A product below the smallest number is zero when positive and minus the smallest number when negative.",
      "domain": "any two numbers",
      "reverts": "Overflow() when the product does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "mulUp",
      "signature": "mulUp(int256,int256)",
      "selector": "0x1aabb2f7",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a * b rounded toward plus infinity: the smallest number at or above the exact product. A positive product below the smallest number is the smallest number, never zero.",
      "domain": "any two numbers",
      "reverts": "Overflow() when the product does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "divDown",
      "signature": "divDown(int256,int256)",
      "selector": "0xddb29e92",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a / b rounded toward minus infinity: div's exact floor quotient and a sticky bit from the remainder, mulmod(ma, 2^255, mb).",
      "domain": "b != 0",
      "reverts": "DivisionByZero() for b == 0; Overflow() when the quotient does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "divUp",
      "signature": "divUp(int256,int256)",
      "selector": "0xe2bec1fe",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "a / b rounded toward plus infinity: the smallest number at or above the exact quotient.",
      "domain": "b != 0",
      "reverts": "DivisionByZero() for b == 0; Overflow() when the quotient does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "toUintDown",
      "signature": "toUintDown(int256)",
      "selector": "0x5fe0506c",
      "inputs": [
        "x"
      ],
      "notice": "floor(x) as a plain uint256, exact for every number in range: what a protocol pays out.",
      "domain": "0 <= x < 2^256",
      "reverts": "OutOfRange() for x < 0 or a word that is not a number; Overflow() at or above 2^256"
    },
    {
      "object": "FP19",
      "name": "toUintUp",
      "signature": "toUintUp(int256)",
      "selector": "0x67d4ca8d",
      "inputs": [
        "x"
      ],
      "notice": "ceil(x) as a plain uint256, exact: what a protocol charges.",
      "domain": "0 <= x <= 2^256 - 2^19",
      "reverts": "OutOfRange() for x < 0 or a word that is not a number; Overflow() at or above 2^256"
    },
    {
      "object": "FP19",
      "name": "toIntDown",
      "signature": "toIntDown(int256)",
      "selector": "0x64f06660",
      "inputs": [
        "x"
      ],
      "notice": "floor(x) as a plain int256 (toward minus infinity), exact.",
      "domain": "-2^255 <= x < 2^255",
      "reverts": "Overflow() when floor(x) does not fit int256; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "toIntUp",
      "signature": "toIntUp(int256)",
      "selector": "0x5ed6bfec",
      "inputs": [
        "x"
      ],
      "notice": "ceil(x) as a plain int256 (toward plus infinity), exact.",
      "domain": "-2^255 <= x < 2^255",
      "reverts": "Overflow() when ceil(x) does not fit int256; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "floor",
      "signature": "floor(int256)",
      "selector": "0xda3ff648",
      "inputs": [
        "x"
      ],
      "notice": "The largest integral number at or below x, exact (x itself from 2^236 on, where every number is an integer).",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "ceil",
      "signature": "ceil(int256)",
      "selector": "0x42fba7ae",
      "inputs": [
        "x"
      ],
      "notice": "The smallest integral number at or above x, exact.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "toFixed18Down",
      "signature": "toFixed18Down(int256)",
      "selector": "0x32154abe",
      "inputs": [
        "x"
      ],
      "notice": "The 18-decimal word at or below x (toward minus infinity), from the exact 512-bit product M 10^18: what a protocol pays out in 18-decimal units.",
      "domain": "|x| 10^18 < 2^255",
      "reverts": "Overflow() when the result does not fit int256; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "toFixed18Up",
      "signature": "toFixed18Up(int256)",
      "selector": "0x27066ea4",
      "inputs": [
        "x"
      ],
      "notice": "The 18-decimal word at or above x (toward plus infinity): what a protocol charges; a positive x below 10^-18 is one unit, never zero.",
      "domain": "|x| 10^18 < 2^255",
      "reverts": "Overflow() when the result does not fit int256; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "fromUintDown",
      "signature": "fromUintDown(uint256)",
      "selector": "0xfebfc540",
      "inputs": [
        "x"
      ],
      "notice": "The largest number at or below x: x itself below 2^237, x truncated to 237 significant bits above.",
      "domain": "any x",
      "reverts": "never"
    },
    {
      "object": "FP19",
      "name": "fromUintUp",
      "signature": "fromUintUp(uint256)",
      "selector": "0x35e13636",
      "inputs": [
        "x"
      ],
      "notice": "The smallest number at or above x: x itself below 2^237, x rounded up to 237 significant bits above (2^256 for the largest).",
      "domain": "any x",
      "reverts": "never"
    },
    {
      "object": "FP19",
      "name": "min",
      "signature": "min(int256,int256)",
      "selector": "0x29aa9cbe",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "The smaller of a and b: one of the two words, exact.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "max",
      "signature": "max(int256,int256)",
      "selector": "0x81fe5786",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "The larger of a and b: one of the two words, exact.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "clamp",
      "signature": "clamp(int256,int256,int256)",
      "selector": "0x7b8d0f0c",
      "inputs": [
        "x",
        "lo",
        "hi"
      ],
      "notice": "min(hi, max(lo, x)), exact. When lo > hi the result is hi, as FP127's.",
      "domain": "any three numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "avg",
      "signature": "avg(int256,int256)",
      "selector": "0xebf274be",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "(a + b) / 2 rounded once from the exact sum: never overflows, and below the format it rounds as every op does.",
      "domain": "any two numbers",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "dist",
      "signature": "dist(int256,int256)",
      "selector": "0x2110b689",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "|a - b|, rounded once (sub's rounding is symmetric, so its magnitude is the rounded distance).",
      "domain": "any two numbers",
      "reverts": "Overflow() when |a - b| does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "zeroFloorSub",
      "signature": "zeroFloorSub(int256,int256)",
      "selector": "0xff78cf2d",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "max(0, a - b), rounded once.",
      "domain": "any two numbers",
      "reverts": "Overflow() when a - b does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "inv",
      "signature": "inv(int256)",
      "selector": "0x3a02c983",
      "inputs": [
        "x"
      ],
      "notice": "1 / x: div's exact quotient floor(2^491 / m), rounded once.",
      "domain": "x != 0",
      "reverts": "DivisionByZero() for x == 0; Overflow() when 1/x does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "lerp",
      "signature": "lerp(int256,int256,int256)",
      "selector": "0x84e13b60",
      "inputs": [
        "a",
        "b",
        "t"
      ],
      "notice": "a + t (b - a), rounded once from the exact value: a, t b and -t a (computed once, in memory) summed exactly in a 1,024-bit window (terms far under it enter as their floor or their sign), so cancellation costs nothing and no intermediate can overflow. t is not clamped.",
      "domain": "any three numbers; the result must fit",
      "reverts": "Overflow() when the result does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "frac",
      "signature": "frac(int256)",
      "selector": "0xae2785ac",
      "inputs": [
        "x"
      ],
      "notice": "x - floor(x), rounded once: in [0, 1), and exact for x >= 0; a negative x within 2^-238 of an integer gives exactly 1, the nearest word to 1 - |x - ceil(x)|.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "round",
      "signature": "round(int256)",
      "selector": "0x58b4370b",
      "inputs": [
        "x"
      ],
      "notice": "The nearest integral number, halves away from zero (FP19's tie rule; FP127's round takes halves up), exact.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "log2Up",
      "signature": "log2Up(int256)",
      "selector": "0xa1985bb6",
      "inputs": [
        "x"
      ],
      "notice": "ceil(log2 x) as a number: the exponent, plus one unless x is a power of two. Exact.",
      "domain": "x > 0",
      "reverts": "OutOfRange() for x <= 0 or a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "factorial",
      "signature": "factorial(int256)",
      "selector": "0x5ad78e8a",
      "inputs": [
        "n"
      ],
      "notice": "floor(n)! rounded once, from a table of the 169 correctly rounded words for 2 <= n <= 170 (exact to 64!), checked against the exact factorial for every n (make sweep). 0! = 1.",
      "domain": "0 <= n < 171 (170! is the largest factorial a binary64 holds)",
      "reverts": "OutOfRange() for n < 0 or a word that is not a number; Overflow() from 171"
    },
    {
      "object": "FP19",
      "name": "cbrt",
      "signature": "cbrt(int256)",
      "selector": "0xd4b6188c",
      "inputs": [
        "x"
      ],
      "notice": "The cube root, cbrt(-x) = -cbrt(x): floor(cbrt(N)) of the significand scaled to N = m 2^(477 + rr), 714 to 716 bits, by Newton with precision doubling (a seed from the top bits, four steps in one word to 85 bits, two residual steps to 170 and 239) and an exact three-word cube at the end, then rounded once. Exact for perfect cubes; never overflows.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "gavg",
      "signature": "gavg(int256,int256)",
      "selector": "0xa13ed853",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "The geometric mean sqrt(a b) of the exact 474-bit product, rounded once; never overflows. Two negatives give the positive root.",
      "domain": "a b >= 0",
      "reverts": "OutOfRange() if a and b have opposite signs (both nonzero) or for a word that is not a number"
    },
    {
      "object": "FP19",
      "name": "hypot",
      "signature": "hypot(int256,int256)",
      "selector": "0xc479210c",
      "inputs": [
        "a",
        "b"
      ],
      "notice": "sqrt(a^2 + b^2) rounded once from the exact sum of squares (floored only at a grid far under the root's), so ties of Pythagorean triples round away from zero; |a| when b is more than 2^120 smaller. No intermediate overflows.",
      "domain": "any two numbers; the result must fit",
      "reverts": "Overflow() when sqrt(a^2 + b^2) does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "exp2",
      "signature": "exp2(int256)",
      "selector": "0xdbbb06d2",
      "inputs": [
        "x"
      ],
      "notice": "2^x: the integer part of x to the exponent, its fraction (exact at 2^-254 from 2^-18 up) through the 2^f kernel, one rounding when the bound clears the rounding boundary, else e^(f ln 2) by wexpm1 in two words: correctly rounded, exact for integral x. Exactly one below 2^-238; zero below -262,142.",
      "domain": "x < 262145",
      "reverts": "Overflow() when 2^x does not fit (x at or above 262,145); OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "exp10",
      "signature": "exp10(int256)",
      "selector": "0x4c0dafa2",
      "inputs": [
        "x"
      ],
      "notice": "10^x = 2^(x log2 10): the 512-bit product with log2 10 split as exp's, the 2^f kernel and one rounding when the bound clears the rounding boundary, else x log2 10 in three words and 2^f by wexpm1: correctly rounded, so 10^n is exact for n = 0 to 102. Exactly one below 2^-240.",
      "domain": "x below about 78,913.4",
      "reverts": "Overflow() when 10^x does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "log2",
      "signature": "log2(int256)",
      "selector": "0xe0d68737",
      "inputs": [
        "x"
      ],
      "notice": "log2(x) = (E - bias) + log2(M / 2^236): the exponent exactly and the mantissa through the log2 kernel, one rounding when its 4 units clear the rounding boundary; within 2^-8 of one, d = x - 1 exact and d ln1pk(d) log2 e. Else the same in two words (pow's wide log2): correctly rounded, exact at powers of two.",
      "domain": "x > 0",
      "reverts": "OutOfRange() for x <= 0 or a word that is not a number"
    },
    {
      "object": "FP19E",
      "name": "log10",
      "signature": "log10(int256)",
      "selector": "0xb47ca3c7",
      "inputs": [
        "x"
      ],
      "notice": "log10(x) = log2(x) log10 2: the exponent exactly, the mantissa through the log2 kernel, one product and one rounding when its 4 units clear the rounding boundary; within 2^-8 of one, ln's series times log10 e. Else u log10 2 + ln(mantissa) log10 e in three words: correctly rounded, exact at the powers of ten that are numbers (10^0 to 10^102).",
      "domain": "x > 0",
      "reverts": "OutOfRange() for x <= 0 or a word that is not a number"
    },
    {
      "object": "FP19H",
      "name": "sinh",
      "signature": "sinh(int256)",
      "selector": "0x17cdc976",
      "inputs": [
        "x"
      ],
      "notice": "sinh(x) = (U + U/(1 + U)) / 2 with U = e^|x| - 1 from expm1's machinery: below 2^-8, x times T = (e^|x| - 1)/|x| from its polynomial (no cancellation, so the relative precision holds all the way down); to 1/2, U from exp's unrounded kernel; above, (e^|x| - e^-|x|) / 2 from that kernel and its reciprocal. One rounding when the bound clears the rounding boundary, else the series or both exponentials in two words: correctly rounded.",
      "domain": "|x| below about 181,705",
      "reverts": "Overflow() when sinh(x) does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19H",
      "name": "cosh",
      "signature": "cosh(int256)",
      "selector": "0xaa13e96a",
      "inputs": [
        "x"
      ],
      "notice": "cosh(x) = (e^|x| + e^-|x|) / 2 from exp's unrounded kernel and its reciprocal, summed before the one rounding (no cancellation); else both exponentials in two words: correctly rounded. Exactly one below 2^-118.",
      "domain": "|x| below about 181,705",
      "reverts": "Overflow() when cosh(x) does not fit; OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19H",
      "name": "tanh",
      "signature": "tanh(int256)",
      "selector": "0x5e1f05c7",
      "inputs": [
        "x"
      ],
      "notice": "tanh(x) = U/(U + 2) with U = e^2|x| - 1 from expm1's machinery: below 2^-9, x times T/(1 + |x| T) with T = (e^2|x| - 1)/(2|x|) from its polynomial; to 1/2, U from exp's unrounded kernel; above, 1 - 2/(e^2|x| + 1) from that kernel. One rounding when the bound clears the rounding boundary, else sinh's and cosh's series or the exponential in two words: correctly rounded. Exactly +-1 once 2|x| log2 e passes 240.",
      "domain": "any number",
      "reverts": "OutOfRange() for a word that is not a number"
    },
    {
      "object": "FP19H",
      "name": "atanh",
      "signature": "atanh(int256)",
      "selector": "0xc6285a68",
      "inputs": [
        "x"
      ],
      "notice": "atanh(x) = log1p(y) / 2 for y = 2|x|/(1 - |x|): below 2^-6, x times R P with R = 1/(1 - |x|) and P = ln(1 + y)/y from log1p's series at y = 2|x| R (no cancellation, so the relative precision holds all the way down); above, (log2(1 + |x|) - log2(1 - |x|)) ln 2 / 2 with both arguments exact under their leading bits (the logarithms have opposite signs). One rounding when the bound clears the rounding boundary, else the odd series or the two logarithms in two words: correctly rounded.",
      "domain": "|x| < 1",
      "reverts": "OutOfRange() for |x| >= 1 or a word that is not a number"
    }
  ]
}
