From 4cc78f0cf6d6c4e0cb68999ad66cdfbb6e6d73c4 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Sat, 3 Jun 2023 09:54:01 +0200 Subject: [PATCH] Revert "Update abs diff rule to 0 at non-differentiable point" --- src/rules.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules.jl b/src/rules.jl index cbd4448..f3590a4 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 # #--------#