We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fcdea9 commit 64145a8Copy full SHA for 64145a8
1 file changed
src/rules.jl
@@ -70,7 +70,7 @@
70
71
# We provide this hook for special number types like `Interval`
72
# that need their own special definition of `abs`.
73
-_abs_deriv(x) = sign(x)
+_abs_deriv(x) = signbit(x) ? -one(x) : one(x)
74
75
# binary #
76
#--------#
0 commit comments