From 64145a8fef27503797c12a31c670f30aeeae7cbc Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 5 Jun 2023 21:47:16 +0200 Subject: [PATCH] Revert "Update abs diff rule to 0 at non-differentiable point" (#100) --- src/rules.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules.jl b/src/rules.jl index 7b9b59e..caa3078 100644 --- a/src/rules.jl +++ b/src/rules.jl @@ -70,7 +70,7 @@ # We provide this hook for special number types like `Interval` # that need their own special definition of `abs`. -_abs_deriv(x) = sign(x) +_abs_deriv(x) = signbit(x) ? -one(x) : one(x) # binary # #--------#