)]}'
{
  "commit": "b44ffbb22708bb5a12d30f468e0bc5d2b6d9096a",
  "tree": "64adedb061834779454d8b1abee1ac6878d46f95",
  "parents": [
    "67e106d6ce639748b939be2baa37848b10fa8963"
  ],
  "author": {
    "name": "Dillon Sharlet",
    "email": "dsharlet@google.com",
    "time": "Tue Sep 08 16:18:09 2026"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Sep 08 16:21:40 2026"
  },
  "message": "Add IEEE 754 special value (+/-Inf, +/-NaN) support and tests to Highway math functions\n\nThis change ensures that Highway math functions conform to IEEE 754 / C11 Annex F specifications for special inputs (+/-Inf, +/-NaN) and adds comprehensive unit tests covering these cases:\n\n- Erf: Added explicit NaN handling to prevent x86 minps/minpd semantics from clamping NaN to +1.0 (+/-Inf handled implicitly via range clamping).\n- Exp / Exp2: Added explicit handling for +Inf / overflow (preventing range reduction arithmetic cancellation into NaN) and NaN (preventing underflow flush to +0.0).\n- Log / Log2 / Log10: Added explicit handling for negative inputs (NaN), +/-0 (-Inf), +Inf (+Inf), and NaN (NaN).\n- Tanh / Expm1 / Log1p: Verified that special inputs (+/-Inf, +/-NaN) are handled implicitly by the underlying arithmetic and range reduction without requiring extra checks.\n- Tests: Added TestSpecialValues in math_test.cc and TestTanhSpecialValues in math_hyper_test.cc covering float32 and float64 across all vector widths.\n\nPerformance Impact:\n- Tanh, Expm1, Log1p: 0% overhead (0 instructions added).\n- Erf: Negligible overhead (1 compare + 1 blend).\n- Exp / Exp2: ~2-4% throughput overhead (2 compares + 2 blends).\n- Log / Log2 / Log10: ~3-5% throughput overhead (4 compares + 4 blends).\nCritical-path latency impact is negligible (0-1 cycle) on superscalar architectures because comparison masks depend solely on the input register and are evaluated by out-of-order execution in parallel with the arithmetic pipeline. Workloads requiring maximum throughput on finite inputs can continue using the Fast* variants (e.g., FastExp, FastLog).\n\nPiperOrigin-RevId: 977949605\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "52e62168155bfa7f61440cb36905c9e8c0581bcb",
      "old_mode": 33188,
      "old_path": "hwy/contrib/math/math-inl.h",
      "new_id": "7d4abad34a1b9f324cd43bc8afdcf73c7e304d32",
      "new_mode": 33188,
      "new_path": "hwy/contrib/math/math-inl.h"
    },
    {
      "type": "modify",
      "old_id": "f6d10125967a443ef087fe956b70ed585b707d1a",
      "old_mode": 33188,
      "old_path": "hwy/contrib/math/math_hyper_test.cc",
      "new_id": "2e862c717a512fc2b544853953d530d0ae9cfc5b",
      "new_mode": 33188,
      "new_path": "hwy/contrib/math/math_hyper_test.cc"
    },
    {
      "type": "modify",
      "old_id": "2eda02e21c2d30f1eeaf4c409b1d37c820aa282a",
      "old_mode": 33188,
      "old_path": "hwy/contrib/math/math_test.cc",
      "new_id": "755d280b6ecbcd795767d007a528f7e88eb6d021",
      "new_mode": 33188,
      "new_path": "hwy/contrib/math/math_test.cc"
    }
  ]
}
