Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DiffRules"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.3.1"
version = "1.4.0"

[deps]
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
Expand Down
4 changes: 0 additions & 4 deletions src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,11 @@ 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 #
####################
Expand Down
5 changes: 1 addition & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ 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
Expand All @@ -63,7 +62,6 @@ 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

Expand All @@ -82,7 +80,6 @@ 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]
Expand All @@ -94,4 +91,4 @@ for cond in [true, false]
@test isapprox(dz, finitediff(z -> ifelse(foo, bar, z), goo), rtol=0.05)
end
end
=#