)]}'
{
  "commit": "632e59dc14c18d318f6afb48a5441103b8f277ff",
  "tree": "8b4a84eceb765f459915b780a91be11ec11072da",
  "parents": [
    "7ab91102c4f2838a43e4a8350a474eddb26dd486"
  ],
  "author": {
    "name": "Laramie Leavitt",
    "email": "lar@google.com",
    "time": "Sun Nov 15 08:44:25 2026 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Nov 19 18:45:03 2026 -0800"
  },
  "message": "Fix precision, cancellation, and degenerate-regime bugs in beta_distribution.\n\nExtreme or skewed shape parameters previously produced biased, constant, or\nnon-terminating draws:\n* In Cheng\u0027s sampler, `float` intermediates underflowed and cancellation in\n  near-zero `expm1`/`log1p` terms broke acceptance at large parameters and\n  inflated sample means under strong skew.\n* Degenerate-regime thresholds collapsed valid skewed distributions with one\n  large parameter to a constant, and overflowed `alpha + beta` when both\n  parameters were large.\n* In Joehnk\u0027s sampler (`alpha, beta \u003c\u003d 1`), subnormal `pow` fast paths,\n  log-space cancellation, and `log(u) / alpha` overflow distorted small-shape\n  and bimodal draws.\n\nThe Joehnk and Cheng rejection steps move out of line into a new\n`beta_distribution.cc`, reducing compiled sampling `.text` per\n`(RealType, URBG)` instantiation from ~1.2-3.5 KB  to ~0.9-1.5 KB on x86-64\n`clang++ -O3` (e.g. 1,407 -\u003e 1,131 B for `\u003cdouble, absl::BitGen\u003e`),\nsharing 1,663 B in `beta_distribution.cc` for `float`/`double`.\n\n`beta_distribution\u003cfloat\u003e` now computes in `double` so that `float` Cheng\nintermediates cannot underflow. `DEGENERATE_SMALL` parameters (both shapes\nbelow `2^(min_exponent / 2)`, or one below `1 / max`) now sample\n`Bernoulli(alpha / (alpha + beta))` instead of a constant 0 or 1.\n`param_type` gains default arguments matching `beta_distribution()` and stores\nits mode-specific state (including Cheng\u0027s precomputed loop invariants) in a\nunion; each Cheng draw evaluates a single `exp` (or `expm1` for\n`min(alpha, beta) \u003e 1e4`).\n\nOutput sequences change; `absl::beta_distribution` does not guarantee\ncross-release stability.\n\nPiperOrigin-RevId: 1022233127\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "253898d8c59e9dd9630f77429526db0b22328fda",
      "old_mode": 33188,
      "old_path": "CMake/AbseilDll.cmake",
      "new_id": "c9ec34026d7df837237abfa98c09ee8fd57495cb",
      "new_mode": 33188,
      "new_path": "CMake/AbseilDll.cmake"
    },
    {
      "type": "modify",
      "old_id": "162e3281bcdd57e9c4c6e113845b489ac06bb199",
      "old_mode": 33188,
      "old_path": "absl/random/BUILD.bazel",
      "new_id": "16a435a29553cdb2f4a9e5e0d9de8a731c0aa1e3",
      "new_mode": 33188,
      "new_path": "absl/random/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "cef4ab511d1680c7e40af5e1a2c5347005161f69",
      "old_mode": 33188,
      "old_path": "absl/random/CMakeLists.txt",
      "new_id": "4a16a795900358b65284fd4442e74a72bd3a4512",
      "new_mode": 33188,
      "new_path": "absl/random/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1a98cfd2c38e1b1170d00f581598b72bf878882b",
      "new_mode": 33188,
      "new_path": "absl/random/beta_distribution.cc"
    },
    {
      "type": "modify",
      "old_id": "b2d0f8fa39de8635d8b2243681277e78e91a8a6b",
      "old_mode": 33188,
      "old_path": "absl/random/beta_distribution.h",
      "new_id": "d4b568d30e2c451101d518557a9eec3574747493",
      "new_mode": 33188,
      "new_path": "absl/random/beta_distribution.h"
    },
    {
      "type": "modify",
      "old_id": "b44bde06678291eb3816ff23a17161df179ae774",
      "old_mode": 33188,
      "old_path": "absl/random/beta_distribution_test.cc",
      "new_id": "7bed18560647d954c52839436391aa33f65f48e4",
      "new_mode": 33188,
      "new_path": "absl/random/beta_distribution_test.cc"
    }
  ]
}
