)]}'
{
  "commit": "601349ae77556beae83cf080ed96fcb4d8f4200a",
  "tree": "eefad0611f57991336aca314ff63fc163b279e85",
  "parents": [
    "a5ca56c3f455d5893ffd97be57c69e7e76e69654"
  ],
  "author": {
    "name": "Sean Talts",
    "email": "talts@google.com",
    "time": "Tue Oct 20 00:06:54 2026"
  },
  "committer": {
    "name": "XNNPACK Team",
    "email": "xnnpack-github-robot@google.com",
    "time": "Tue Oct 20 00:08:05 2026"
  },
  "message": "[YNNPACK:SIMD] Improve log1p accuracy for exp \u003d\u003d 1 via FMA range reduction\n\nIn `log_taylor2\u003c1\u003e`, range reduction decomposes $y \u003d x + 1$ into $2^{\\text{exp}} (1 + r)$. When $\\text{exp} \u003d\u003d 1$ (corresponding to $x \\in (\\sqrt{2} - 1, 2\\sqrt{2} - 1] \\approx (0.41421, 1.82843]$), $y_{\\text{norm}} \u003d 0.5(x + 1)$ and $r \u003d y_{\\text{norm}} - 1 \u003d 0.5x - 0.5$.\n\nFor $x \\in (\\sqrt{2} - 1, 1)$, $x$ has exponent $-1$ while $y \u003d x + 1 \\in (\\sqrt{2}, 2)$ has exponent $0$, so computing $y \u003d x + 1$ shifts $x$\u0027s mantissa right by 1 bit and rounds away the least significant bit of $x$. Subtracting $1$ in $r \u003d 0.5 y - 1$ then cancels the leading bit, and the final reconstruction $\\ln(2) + \\ln(1 + r)$ adds opposite-sign terms, magnifying the rounding error up to 2.95 ULP in single precision and causing downstream `asinh` (which decomposes to $\\text{log1p}(|x| + x^2 / (1 + \\sqrt{1 + x^2}))$) to reach 2.90 ULP in double precision near $x \u003d 0.5$ ($u \\approx 0.618$).\n\nEvaluating $r \u003d 0.5x - 0.5$ directly via FMA (`multiply_add(x, half, neg_half)`) when $\\text{exp} \u003d\u003d 1$ avoids the intermediate rounding of $x + 1$:\n- Drops downstream `asinh(0.49999999999999983)` error in `float64` from 2.8977 ULP to 0.8977 ULP.\n- Drops exhaustive `float32` `log1p(x)` error on $[10^{-6}, 4.0]$ (with relative-error minimax `[2/2]` coefficients) from max 2.8149 ULP to 2.1587 ULP, reducing points \u003e 2.0 ULP by 2,247x (96,640 -\u003e 43) and points \u003e 1.5 ULP by 24x (720,329 -\u003e 29,801).\n\nPiperOrigin-RevId: 1002699717\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "87261191947bf9a5f080fda951772decba12a04c",
      "old_mode": 33188,
      "old_path": "ynnpack/base/simd/target_independent.inc",
      "new_id": "801e672593545b9ccef66da68be6bd828416248b",
      "new_mode": 33188,
      "new_path": "ynnpack/base/simd/target_independent.inc"
    }
  ]
}
