From ead820dfd4dcac0264a2f927ce5d91c10f74bb23 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Sun, 4 Jul 2021 14:54:40 -0400 Subject: [PATCH 1/3] comment out trinary rules --- src/rules.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rules.jl b/src/rules.jl index 9d99666..05100e3 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -104,11 +104,15 @@ end # trinary # #---------# +#= + @define_diffrule Base.muladd(x, y, z) = :($y), :($x), :(one($z)) @define_diffrule Base.fma(x, y, z) = :($y), :($x), :(one($z)) @define_diffrule Base.ifelse(p, x, y) = false, :($p), :(!$p) +=# + #################### # SpecialFunctions # #################### From 148b29c20d4724bb897076d17765db8a47f73e2d Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Sun, 4 Jul 2021 14:58:08 -0400 Subject: [PATCH 2/3] also comment out trinary tests --- test/runtests.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index c41c29e..e3da95f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -47,6 +47,7 @@ for (M, f, arity) in DiffRules.diffrules() end end elseif arity == 3 + #= @test DiffRules.hasdiffrule(M, f, 3) derivs = DiffRules.diffrule(M, f, :foo, :bar, :goo) @eval begin @@ -62,6 +63,7 @@ for (M, f, arity) in DiffRules.diffrules() @test isapprox(dz, finitediff(z -> $M.$f(foo, bar, z), goo), rtol=0.05) end end + =# end end @@ -80,6 +82,7 @@ for xtype in [:Float64, :BigFloat, :Int64] end # Test ifelse separately as first argument is boolean +#= @test DiffRules.hasdiffrule(:Base, :ifelse, 3) derivs = DiffRules.diffrule(:Base, :ifelse, :foo, :bar, :goo) for cond in [true, false] @@ -91,4 +94,4 @@ for cond in [true, false] @test isapprox(dz, finitediff(z -> ifelse(foo, bar, z), goo), rtol=0.05) end end - +=# From 48e04785bf7664779be069e48e0fea6e474e3bb3 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Sun, 4 Jul 2021 14:59:10 -0400 Subject: [PATCH 3/3] v1.2.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cb41cbd..8b02fc4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DiffRules" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.2.0" +version = "1.2.1" [deps] NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"