[Mlir-commits] [mlir] [MLIR][Math] Add erfc to math dialect (PR	#126439)
    Benoit Jacob 
    llvmlistbot at llvm.org
       
    Thu Feb 13 17:36:26 PST 2025
    
    
  
================
@@ -1118,6 +1122,101 @@ ErfPolynomialApproximation::matchAndRewrite(math::ErfOp op,
   return success();
 }
 
+// Approximates erfc(x) with p((x - 2) / (x + 2)), where p is a 9 degree
+// polynomial.This approximation is based on the following stackoverflow post:
+// https://stackoverflow.com/questions/35966695/vectorizable-implementation-of-complementary-error-function-erfcf
----------------
bjacob wrote:
The SO post itself mentions the reference that this comes from. I think it would be worth mentioning here along with the SO post.
https://github.com/llvm/llvm-project/pull/126439
    
    
More information about the Mlir-commits
mailing list