From 703658ccf137eb402df0d006687f5b92e768fe71 Mon Sep 17 00:00:00 2001 From: Xcelerit Team <8776281+xcelerit-team@users.noreply.github.com> Date: Sat, 27 Jul 2024 08:56:47 +0100 Subject: [PATCH 1/2] Adds additional specialisations for lltrunc and llround --- ql/qlrisks.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ql/qlrisks.hpp b/ql/qlrisks.hpp index 1ac909b..18bf5e4 100644 --- a/ql/qlrisks.hpp +++ b/ql/qlrisks.hpp @@ -237,6 +237,15 @@ namespace boost { return boost::math::lltrunc(xad::value(v)); } + inline long_long_type lltrunk(const xad::AReal& v) { + return boost::math::lltrunk(xad::value(v)); + } + + template + inline long_long_type llround(const xad::AReal& v, const Policy& p) { + return boost::math::llround(xad::value(v), p); + } + template inline int itrunc(const xad::BinaryExpr& v) { return itrunc(xad::value(v), policies::policy<>()); From 17740ae773e7d8a6e8266ec417099be94f8e862e Mon Sep 17 00:00:00 2001 From: Xcelerit Team <8776281+xcelerit-team@users.noreply.github.com> Date: Sat, 27 Jul 2024 09:00:23 +0100 Subject: [PATCH 2/2] Fixes typos --- ql/qlrisks.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql/qlrisks.hpp b/ql/qlrisks.hpp index 18bf5e4..b3b3fc4 100644 --- a/ql/qlrisks.hpp +++ b/ql/qlrisks.hpp @@ -237,8 +237,8 @@ namespace boost { return boost::math::lltrunc(xad::value(v)); } - inline long_long_type lltrunk(const xad::AReal& v) { - return boost::math::lltrunk(xad::value(v)); + inline long_long_type lltrunc(const xad::AReal& v) { + return boost::math::lltrunc(xad::value(v)); } template