diff --git a/Project.toml b/Project.toml index 49d8e90..fc3dfd5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DiffRules" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.7.0" +version = "1.8.0" [deps] LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" @@ -11,7 +11,7 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] LogExpFunctions = "0.3.2" NaNMath = "0.3" -SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2" +SpecialFunctions = "0.10, 1.0, 2" julia = "1.3" [extras] diff --git a/src/rules.jl b/src/rules.jl index c6f8e48..9ed53ec 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -121,6 +121,8 @@ _abs_deriv(x) = signbit(x) ? -one(x) : one(x) @define_diffrule SpecialFunctions.erfi(x) = :( (2 / sqrt(π)) * exp($x * $x) ) @define_diffrule SpecialFunctions.erfcx(x) = :( (2 * $x * SpecialFunctions.erfcx($x)) - (2 / sqrt(π)) ) +@define_diffrule SpecialFunctions.logerfcx(x) = + :( 2 * ($x - inv(SpecialFunctions.erfcx($x) * sqrt(π))) ) @define_diffrule SpecialFunctions.dawson(x) = :( 1 - (2 * $x * SpecialFunctions.dawson($x)) ) @define_diffrule SpecialFunctions.digamma(x) =