Skip to content

Commit c226986

Browse files
committed
methods: add missing withUnit calls to 2 numerical comparisons
1 parent b3fe4e7 commit c226986

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/methods.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ function estimate_step(
373373
unit(x),
374374
unit(f |> eltype) / unit(x) ^ Q
375375
),
376-
if ∇f_magnitude == 0.0 || f_magnitude == 0.0
376+
if ∇f_magnitude == withUnit(∇f_magnitude,0.0) || f_magnitude == withUnit(unit(f_magnitude), 0.0)
377377
_compute_step_acc_default(m, x)
378378
else
379379
_compute_step_acc(m, ∇f_magnitude, eps(f_magnitude))

0 commit comments

Comments
 (0)