2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-27 19:12:08 +00:00

Fix for expression template use in chebyshev.hpp.

This commit is contained in:
jzmaddock
2023-06-21 08:56:02 +01:00
parent b57749d9c3
commit 0a014fd5ca

View File

@@ -77,7 +77,7 @@ inline Real chebyshev_imp(unsigned n, Real const & x, const Policy&)
if (x > 1 || x < -1)
{
Real t = sqrt(x*x -1);
return static_cast<Real>((expt(x+t, n+1) - expt(x-t, n+1))/(2*t));
return static_cast<Real>((expt(static_cast<Real>(x+t), n+1) - expt(static_cast<Real>(x-t), n+1))/(2*t));
}
T1 = 2*x;
}