Skip to content

Commit

Permalink
Correct cast to Real for ternary expression
Browse files Browse the repository at this point in the history
  • Loading branch information
auto-differentiation-dev committed Mar 22, 2024
1 parent 7356c36 commit 2a7555b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/experimental/math/laplaceinterpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace QuantLib {
if (i != j)
weight += corner_h[i];
}
weight = dim.size() == 1 ? 1.0 : weight / sum_corner_h;
weight = dim.size() == 1 ? Real(1.0) : Real(weight / sum_corner_h);
g(count, layout_->index(coord_j)) = -weight;
}
g(count, count) = 1.0;
Expand Down

0 comments on commit 2a7555b

Please sign in to comment.