[Mlir-commits] [mlir] [mlir][complex] Fix exp special values for infinite real part (PR #232791)
Mattéo Rizza Murgier
llvmlistbot at llvm.org
Mon Oct 19 02:22:44 PDT 2026
================
----------------
matteo-rm wrote:
Nit: Update the comment to add the new special cases:
```suggestion
// exp(x+I*y) = exp(x)*(cos(y)+I*sin(y))
// Handle special cases as StableHLO implementation does:
// 1. When b == 0, set imag(exp(z)) = 0
// 2. When exp(x) == inf, use exp(x/2)*(cos(y)+I*sin(y))*exp(x/2)
// Handle non-finite inputs according to C99 annex G:
// 3. When x == -inf and y is non-finite, return 0 + I*0.
// 4. When x == +inf and y is non-finite, return inf + I*NaN.
```
https://github.com/llvm/llvm-project/pull/232791
More information about the Mlir-commits
mailing list