summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/ellint_rd.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:12:59 (GMT)
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:12:59 (GMT)
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/math/special_functions/ellint_rd.hpp
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-b8cf34c691623e4ec329053cbbf68522a855882d.zip
boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz
boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/math/special_functions/ellint_rd.hpp')
-rw-r--r--boost/math/special_functions/ellint_rd.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/boost/math/special_functions/ellint_rd.hpp b/boost/math/special_functions/ellint_rd.hpp
index 03b73b1..c08430d 100644
--- a/boost/math/special_functions/ellint_rd.hpp
+++ b/boost/math/special_functions/ellint_rd.hpp
@@ -133,6 +133,7 @@ T ellint_rd_imp(T x, T y, T z, const Policy& pol)
T A0 = An;
// This has an extra 1.2 fudge factor which is really only needed when x, y and z are close in magnitude:
T Q = pow(tools::epsilon<T>() / 4, -T(1) / 8) * (std::max)((std::max)(An - x, An - y), An - z) * 1.2f;
+ BOOST_MATH_INSTRUMENT_VARIABLE(Q);
T lambda, rx, ry, rz;
unsigned k = 0;
T fn = 1;
@@ -151,6 +152,9 @@ T ellint_rd_imp(T x, T y, T z, const Policy& pol)
zn = (zn + lambda) / 4;
fn /= 4;
Q /= 4;
+ BOOST_MATH_INSTRUMENT_VARIABLE(k);
+ BOOST_MATH_INSTRUMENT_VARIABLE(RD_sum);
+ BOOST_MATH_INSTRUMENT_VARIABLE(Q);
if(Q < An)
break;
}
@@ -168,6 +172,7 @@ T ellint_rd_imp(T x, T y, T z, const Policy& pol)
T result = fn * pow(An, T(-3) / 2) *
(1 - 3 * E2 / 14 + E3 / 6 + 9 * E2 * E2 / 88 - 3 * E4 / 22 - 9 * E2 * E3 / 52 + 3 * E5 / 26 - E2 * E2 * E2 / 16
+ 3 * E3 * E3 / 40 + 3 * E2 * E4 / 20 + 45 * E2 * E2 * E3 / 272 - 9 * (E3 * E4 + E2 * E5) / 68);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
result += 3 * RD_sum;
return result;