C++ functions which evaluate Chebyshev polynomials