From 2a7555baef3be926f8fe2ddff7b5a436ee7f812b Mon Sep 17 00:00:00 2001 From: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Fri, 22 Mar 2024 07:48:23 +0000 Subject: [PATCH] Correct cast to Real for ternary expression --- ql/experimental/math/laplaceinterpolation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql/experimental/math/laplaceinterpolation.cpp b/ql/experimental/math/laplaceinterpolation.cpp index 93748bd9a65..c9e3d1a93dd 100644 --- a/ql/experimental/math/laplaceinterpolation.cpp +++ b/ql/experimental/math/laplaceinterpolation.cpp @@ -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;