diff --git a/Project.toml b/Project.toml index bf2c59a..c962cf8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DiffRules" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.5.0" +version = "1.6.0" [deps] LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" @@ -9,7 +9,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" [compat] -LogExpFunctions = "0.3" +LogExpFunctions = "0.3.2" NaNMath = "0.3" SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2" julia = "1" diff --git a/src/DiffRules.jl b/src/DiffRules.jl index e51f4d9..b70cae5 100644 --- a/src/DiffRules.jl +++ b/src/DiffRules.jl @@ -2,8 +2,6 @@ __precompile__() module DiffRules -import LogExpFunctions - include("api.jl") include("rules.jl") diff --git a/src/rules.jl b/src/rules.jl index 88cb5af..d70b71e 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -255,7 +255,4 @@ end :(z = LogExpFunctions.logsubexp($x, $y); $x > $y ? exp($x - z) : -exp($x - z)), :(z = LogExpFunctions.logsubexp($x, $y); $x > $y ? -exp($y - z) : exp($y - z)) -# only defined in LogExpFunctions >= 0.3.2 -if isdefined(LogExpFunctions, :xlog1py) - @define_diffrule LogExpFunctions.xlog1py(x, y) = :(log1p($y)), :($x / (1 + $y)) -end +@define_diffrule LogExpFunctions.xlog1py(x, y) = :(log1p($y)), :($x / (1 + $y))