Loading [MathJax]/extensions/tex2jax.js
kyosu v0.1.0
Complex Without Complexes
 
All Classes Namespaces Functions Variables Typedefs Modules Pages Concepts
Loading...
Searching...
No Matches

◆ legendre

kyosu::legendre = eve::functor<legendre_t>
inlineconstexpr

Computes the value of the Legendre and associated Legendre functions of order n ( and 'm) atx`:

For positive integer n the standard legendre functions are polynomials:

  • The Legendre polynomial of order n is given by \(\displaystyle \mbox{L}_{n}(x) = \frac{e^x}{n!}\frac{d^n}{dx^n}(x^ne^{-x})\).

However the function legendre must and can be called with real or complex parameters.

Header file

#include <kyosu/functions.hpp>

Callable Signatures

namespace eve
{
// Regular overload
auto constexpr legendre(kyosu::concepts::real auto n, kyosu::concepts::cayley_dickson auto z) noexcept; // 1
auto constexpr legendre(kyosu::concepts::real auto n, kyosu::concepts::real auto z) noexcept; // 1
// Lanes masking
constexpr auto legendre[conditional_expr auto c](/* any previous overload */) noexcept; // 2
constexpr auto legendre[logical_value auto m](/* any previous overload */) noexcept; // 2
// Semantic options
constexpr auto legendre[successor](integral_value auto n,
kyosu::concepts::cayley_dickson auto pnm1) noexcept; // 3
}
General Cayley-dickson concept.
Definition: concepts.hpp:41
General real concept.
Definition: concepts.hpp:48
constexpr auto legendre
Computes the value of the Legendre and associated Legendre functions of order n ( and 'm) atx`:
Definition: legendre.hpp:116

Parameters

  • n : integral positive arguments.
  • z : cayley_dickson or real argument
  • pn, pnm1 : cayley_dickson arguments
  • c: Conditional expression masking the operation.
  • m: Logical value masking the operation.

Return value

  1. The value of the Legendre polynomial of order n at z is returned.
  2. The operation is performed conditionnaly.
  3. The successor option implements the three term recurrence relation for the (associated) Legendre functions, \(\displaystyle \mbox{P}_{l+1} = \left((2l+1)\mbox{P}_{l}(x)-l\mbox{P}_{l-1}(x)\right)/(l+1)\).

External references

Example