Skip to content

Commit 24c86ec

Browse files
committed
Add information about approximation.
1 parent b88cf3e commit 24c86ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,9 @@ ErfPolynomialApproximation::matchAndRewrite(math::ErfOp op,
11221122
return success();
11231123
}
11241124

1125-
// Approximates erfc(x) with
1125+
// Approximates erfc(x) with p((x - 2) / (x + 2)), where p is a 9 degree
1126+
// polynomial.This approximation is based on the following stackoverflow post:
1127+
// https://stackoverflow.com/questions/35966695/vectorizable-implementation-of-complementary-error-function-erfcf
11261128
LogicalResult
11271129
ErfcPolynomialApproximation::matchAndRewrite(math::ErfcOp op,
11281130
PatternRewriter &rewriter) const {

0 commit comments

Comments
 (0)