Skip to content

Commit 2cf092b

Browse files
authored
Merge pull request #98 from agerlach/abs
Update abs diff rule to 0 at non-differentiable point
2 parents 2001650 + fee3857 commit 2cf092b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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) = signbit(x) ? -one(x) : one(x)
73+
_abs_deriv(x) = sign(x)
7474

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

0 commit comments

Comments
 (0)