E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ sph_bessel_yn

eve::sph_bessel_yn = functor<sph_bessel_yn_t>
inlineconstexpr

It is a solution of \( x^{2}y''+2xy'+(x^2-n(n+1))y=0\) for which \( y(0) = -\infty\)

Header file

#include <eve/module/bessel.hpp>

Callable Signatures

namespace eve
{
// Regular overload
template<value N, floating_value T> constexpr as_wide_as_t<T,N> cyl_bessel_yn(N n, T x) noexcept; // 1
// Lanes masking
constexpr auto sph_bessel_yn[conditional_expr auto c](value auto n, floating_value auto x) noexcept; // 2
constexpr auto sph_bessel_yn[logical_value auto m](value auto n, floating_value auto x) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition: conditional.hpp:27
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition: value.hpp:95
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition: value.hpp:107
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition: value.hpp:33
constexpr auto sph_bessel_yn
Computes the the spherical Bessel functions of the second kind of order n, .
Definition: sph_bessel_yn.hpp:78
constexpr auto cyl_bessel_yn
elementwise_callable object computing the Bessel functions of the second kind, .
Definition: cyl_bessel_yn.hpp:80
EVE Main Namespace.
Definition: abi.hpp:18

Parameters

  • n: Order of the function.
  • x: Floating argument.
  • c: Conditional expression masking the operation.
  • m: Logical value masking the operation.

Return value

The value of \( \displaystyle y_{n}(x)= (-x)^n\left(\frac1x\frac{d}{dx}\right)^n \frac{\cos x}x\) is returned.

External references

Example

// revision 1
#include <eve/module/bessel.hpp>
#include <iostream>
eve::wide<double> wf([](auto i, auto c)->double{ return 2*(i+c/2);});
eve::wide<std::uint64_t> wu([](auto i, auto )->std::uint64_t{ return 2*i;});
eve::wide x{0.5, 1.5, 0.1, 1.0, 19.0, 25.0, 21.5, 10000.0};
eve::wide n{0, 1, 15, 2, 25, 26, 3, 12};
int main()
{
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wu = " << wu << "\n";
std::cout << "<- n = " << n << "\n";
std::cout << "<- x = " << x << "\n";
std::cout << "-> sph_bessel_yn(wu, wf) = " << eve::sph_bessel_yn(wu, wf) << "\n";
std::cout << "-> sph_bessel_yn[ignore_last(2)](wu, wf)= " << eve::sph_bessel_yn[eve::ignore_last(2)](wu, wf) << "\n";
std::cout << "-> sph_bessel_yn[wu != 2u](wu, wf) = " << eve::sph_bessel_yn[wu != 2u](wu, wf) << "\n";
std::cout << "-> sph_bessel_yn(n, x) = " << eve::sph_bessel_yn(n, x) << "\n";
}
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition: conditional.hpp:304
Wrapper for SIMD registers.
Definition: wide.hpp:71