From b26054ddba2543681005c473e94c55780b51e2c9 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 3 Oct 2023 10:14:53 -0400 Subject: [PATCH] Use `@fastmath` --- src/levenberg.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/levenberg.jl b/src/levenberg.jl index 30665178f..a4ea418e9 100644 --- a/src/levenberg.jl +++ b/src/levenberg.jl @@ -225,7 +225,7 @@ function perform_step!(cache::LevenbergMarquardtCache{true}) # Require acceptable steps to satisfy the following condition. norm_v = norm(v) - if 1 + log2(norm(cache.a)) - log2(norm_v) ≤ log2(α_geodesic) + if @fastmath(1 + log2(norm(cache.a)) - log2(norm_v) ≤ log2(α_geodesic)) @. cache.δ = v + cache.a / 2 @unpack δ, loss_old, norm_v_old, v_old, b_uphill = cache f(cache.fu_tmp, u .+ δ, p)