From 0a06863931183dd9a085609371f99fc1f704b73c Mon Sep 17 00:00:00 2001 From: imrn99 <95699343+imrn99@users.noreply.github.com> Date: Sun, 1 Sep 2024 08:56:45 +0200 Subject: [PATCH] fix mistake in uniform step formula --- integraal/src/structure/implementations.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integraal/src/structure/implementations.rs b/integraal/src/structure/implementations.rs index ca15006..883d747 100644 --- a/integraal/src/structure/implementations.rs +++ b/integraal/src/structure/implementations.rs @@ -200,7 +200,7 @@ fn values_uniform_arm( let [i, ip1, ip2] = is else { unreachable!(); }; - vals[*i] + X::from(2.0).unwrap() * vals[*ip1] + vals[*ip2] + vals[*i] + X::from(4.0).unwrap() * vals[*ip1] + vals[*ip2] }) .sum() } @@ -315,7 +315,7 @@ fn closure_uniform_arm( unreachable!(); }; closure(*start + *step * X::from(*i).unwrap()) - + X::from(2.0).unwrap() + + X::from(4.0).unwrap() * closure(*start + *step * X::from(*ip1).unwrap()) + closure(*start + *step * X::from(*ip2).unwrap()) })