Skip to content

Commit

Permalink
fix mistake in uniform step formula
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Sep 1, 2024
1 parent ec483b7 commit 0a06863
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integraal/src/structure/implementations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn values_uniform_arm<X: Scalar>(
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()
}
Expand Down Expand Up @@ -315,7 +315,7 @@ fn closure_uniform_arm<X: Scalar>(
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())
})
Expand Down

0 comments on commit 0a06863

Please sign in to comment.