Skip to content

Commit

Permalink
Adding Real initialiser to inner_product
Browse files Browse the repository at this point in the history
  • Loading branch information
auto-differentiation-dev committed Jun 10, 2022
1 parent cadd867 commit ad19ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/math/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ namespace QuantLib {
QL_REQUIRE(v1.size() == v2.size(),
"arrays with different sizes (" << v1.size() << ", "
<< v2.size() << ") cannot be multiplied");
return std::inner_product(v1.begin(),v1.end(),v2.begin(),0.0);
return std::inner_product(v1.begin(),v1.end(),v2.begin(),Real(0.0));
}

inline Real Norm2(const Array& v) {
Expand Down

0 comments on commit ad19ccc

Please sign in to comment.