We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3fe4e7 commit c226986Copy full SHA for c226986
1 file changed
src/methods.jl
@@ -373,7 +373,7 @@ function estimate_step(
373
unit(x),
374
unit(f |> eltype) / unit(x) ^ Q
375
),
376
- if ∇f_magnitude == 0.0 || f_magnitude == 0.0
+ if ∇f_magnitude == withUnit(∇f_magnitude,0.0) || f_magnitude == withUnit(unit(f_magnitude), 0.0)
377
_compute_step_acc_default(m, x)
378
else
379
_compute_step_acc(m, ∇f_magnitude, eps(f_magnitude))
0 commit comments