The Gegenbauer polynomials are a sequence of orthogonal polynomials relative to \((1-x^2)^{\lambda-1/2\) on the \([-1, +1]\) interval satisfying the following recurrence relation:
{
template< eve::integral_value T eve::floating_value T, eve::floating_ordered_value U >
constexpr eve::as_wide_as<eve::common_value_t<T, U>, N>
}
constexpr auto gegenbauer
Computes the value of a gegenbauer polynomial .
Definition: gegenbauer.hpp:84
EVE Main Namespace.
Definition: abi.hpp:18
The value of \( \mathbf{C}_n^\lambda(x)\) is returned.
#include <eve/module/polynomial.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft xd = {0.5, -1.5, 0.1, -1.0, 19.0, 25.0, 21.5, 10000.0};
wide_it n = {0, 1, 2, 3, 4, 5, 6, 7};
wide_ft x(0.3);
wide_ft l(-3.0/8.0);
std::cout << "---- simd" << '\n'
<< "<- xd = " << xd << '\n'
<< "<- n = " << n << '\n'
<< "<- l = " << l << '\n'
<< "<- x = " << x << '\n'
<<
"-> gegenbauer(n, -3.0/8.0, 0.3) = " <<
eve::gegenbauer(n, -3.0/8.0, 0.3) <<
'\n'
;
double xs = 3.0;
double ll = 0.1;
std::cout << "---- scalar" << '\n'
<< "<- xs = " << xs << '\n'
<< "<- ll = " << ll << '\n'
;
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65