Skip to content

Commit 64145a8

Browse files
authored
Revert "Update abs diff rule to 0 at non-differentiable point" (#100)
1 parent 3fcdea9 commit 64145a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
# We provide this hook for special number types like `Interval`
7272
# that need their own special definition of `abs`.
73-
_abs_deriv(x) = sign(x)
73+
_abs_deriv(x) = signbit(x) ? -one(x) : one(x)
7474

7575
# binary #
7676
#--------#

0 commit comments

Comments
 (0)