tn
-
constexpr Complex tn(int n, const Complex &z) noexcept
Evaluates the nth Chebyshev polynomial of the first kind [1] for a complex input.
Parameters
- const Complex &z
A complex number.
- const int n
A nonnegative integer.
Returns
- type Complex
A complex number.
Chebyshev polynomials of the first kind can be defined as follows:
\[T_n(z) = \cos(n\cos^{-1}(z))\]
Example
Complex z = 1.0 + 1_j;
int n = 1;
std::cout << tn(n, z) << "\n";
Output:
1 + 1j
References