From cd7f75c47a4a955d82f94a584fb158e2ac1030f6 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Fri, 12 Apr 2019 13:54:30 +0100 Subject: [PATCH] Add erf and erfc --- loopy/target/c/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loopy/target/c/__init__.py b/loopy/target/c/__init__.py index 4644935e0..9cf9e7e94 100644 --- a/loopy/target/c/__init__.py +++ b/loopy/target/c/__init__.py @@ -372,7 +372,8 @@ class CMathCallable(ScalarCallable): # unary functions if name in ["fabs", "acos", "asin", "atan", "cos", "cosh", "sin", "sinh", - "tan", "tanh", "exp", "log", "log10", "sqrt", "ceil", "floor"]: + "tan", "tanh", "exp", "log", "log10", "sqrt", "ceil", "floor", + "erf", "erfc"]: for id in arg_id_to_dtype: if not -1 <= id <= 0: @@ -466,7 +467,7 @@ def scope_c_math_functions(target, identifier): if identifier in ["abs", "acos", "asin", "atan", "cos", "cosh", "sin", "sinh", "pow", "atan2", "tanh", "exp", "log", "log10", "sqrt", "ceil", "floor", "max", "min", "fmax", "fmin", - "fabs", "tan"]: + "fabs", "tan", "erf", "erfc"]: return CMathCallable(name=identifier) return None -- GitLab