Skip to content

Commit

Permalink
Fixes accumulate to work with the Real type in laplaceinterpolation.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
auto-differentiation-dev committed Mar 22, 2024
1 parent 2a7555b commit a5a6c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/experimental/math/laplaceinterpolation.cpp
Expand Up @@ -143,7 +143,7 @@ namespace QuantLib {
// handling of the "corners", all second derivs are zero in the op
// this directly generalizes Numerical Recipes, 3rd ed, eq 3.8.6
Real sum_corner_h =
std::accumulate(corner_h.begin(), corner_h.end(), 0.0, std::plus<Real>());
std::accumulate(corner_h.begin(), corner_h.end(), Real(0.0), std::plus<Real>());
for (Size j = 0; j < dim.size(); ++j) {
std::vector<Size> coord_j(coord);
coord_j[j] = corner_neighbour_index[j];
Expand Down

0 comments on commit a5a6c55

Please sign in to comment.