[Mlir-commits] [mlir] Fix Tan inaccuracies on extreme complex inputs. (PR #92443)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu May 16 12:01:35 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 9a7f54ba4878c4e66c99430b52d8c014ab7b2a03 dded7209c60e056b2415dbf14e70fe613cfe281e -- mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
index e6706a428f..edca8eaecb 100644
--- a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
+++ b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
@@ -978,7 +978,7 @@ struct TanTanhOpConversion : public OpConversionPattern<Op> {
elementType, b.getFloatAttr(elementType, -1.0));
if constexpr (std::is_same_v<Op, complex::TanOp>) {
- // tan(x+yi) = -i*tanh(-y + xi)
+ // tan(x+yi) = -i*tanh(-y + xi)
std::swap(real, imag);
real = b.create<arith::MulFOp>(real, negOne, fmf);
}
@@ -1046,7 +1046,7 @@ struct TanTanhOpConversion : public OpConversionPattern<Op> {
}
if constexpr (std::is_same_v<Op, complex::TanOp>) {
- // tan(x+yi) = -i*tanh(-y + xi)
+ // tan(x+yi) = -i*tanh(-y + xi)
std::swap(resultReal, resultImag);
resultImag = b.create<arith::MulFOp>(resultImag, negOne, fmf);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/92443
More information about the Mlir-commits
mailing list