◆ legendre
Callable object evaluating the legendre functions. Required header: Members Functions
Definition: value.hpp:83 Definition: value.hpp:42 Parameters
Return value With two parameters returns elementwise the value of the first kind Legendre polynomial of order With three parameters returns elementwise the value of the associated Legendre "polynomial" of order ( The result type is of the index compatible type type of the parameters.
Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/legendre.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
using wide_ft = eve::wide<double, eve::fixed<8>>;
using wide_it = eve::wide<int , eve::fixed<8>>;
int main()
{
wide_ft xd = {-0.1, -0.2, -0.3, -0.5, 0.0, 0.2, 0.3, 2.0};
wide_it n = {0, 1, 2, 3, 4, 5, 6, 7};
wide_ft x(0.5);
std::cout << "---- simd" << '\n'
<< "<- xd = " << xd << '\n'
<< "<- n = " << n << '\n'
<< "<- x = " << x << '\n'
double xs = 0.1;
std::cout << "---- scalar" << '\n'
<< "<- xs = " << xs << '\n'
return 0;
}
constexpr callable_legendre_ legendre Callable object evaluating the legendre functions. Definition: legendre.hpp:89 |