Skip to content

Commit 7262054

Browse files
authored
Remove explicit != methods for Dual (#793)
* Remove explicit `!=` methods for Dual These are already defined by Base in terms of `==`. * Bump version
1 parent 71258ec commit 7262054

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ForwardDiff"
22
uuid = "f6369f11-7733-5829-9624-2563aa707210"
3-
version = "1.3.1"
3+
version = "1.3.2"
44

55
[deps]
66
CommonSubexpressions = "bbf7d656-a473-5ed7-a52c-81e309532950"

src/dual.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ for pred in UNARY_PREDICATES
391391
end
392392

393393
# Before PR#481 this loop ran over this list:
394-
# BINARY_PREDICATES = Symbol[:isequal, :isless, :<, :>, :(==), :(!=), :(<=), :(>=)]
394+
# BINARY_PREDICATES = Symbol[:isequal, :isless, :<, :>, :(==), :(<=), :(>=)]
395395
# Not a minimal set, as Base defines some in terms of others.
396396
@define_binary_dual_op(
397397
Base.:(<),
@@ -426,13 +426,6 @@ for pred in [:isequal, :(==)]
426426
end
427427
end
428428

429-
@define_binary_dual_op(
430-
Base.:(!=),
431-
(!=)(value(x), value(y)) || (!=)(partials(x), partials(y)),
432-
(!=)(value(x), y) || !iszero(partials(x)),
433-
(!=)(x, value(y)) || !iszero(partials(y)),
434-
)
435-
436429
########################
437430
# Promotion/Conversion #
438431
########################

0 commit comments

Comments
 (0)