kyosu v0.1.0
Complex Without Complexes
 
Loading...
Searching...
No Matches

◆ cyl_bessel_kn

kyosu::cyl_bessel_kn = {}
inlineconstexpr

Computes the modified Bessel functions of the second kind, \( K_{n}(x)=\lim_{\alpha\to n}{\frac {\pi }{2}}{\frac {I_{-\alpha }(x)-I_{\alpha }(x)}{\sin \alpha \pi }}\). extended to the complex plane and cayley_dickson algebras.

#include <kyosu/functions.hpp>

Callable Signatures

namespace kyosu
{
template<kyosu::concepts::cayley_dickson T> constexpr auto cyl_bessel_kn(int n, T z) noexcept;
template<eve::floating_ordered_value T> constexpr T cyl_bessel_kn(int n, T z) noexcept;
}
constexpr tags::callable_cyl_bessel_kn cyl_bessel_kn
Computes the modified Bessel functions of the second kind, . extended to the complex plane and cayley...
Definition: cyl_bessel_kn.hpp:74
Main KYOSU namespace.
Definition: types.hpp:14

Parameters

  • z: Value to process.

Return value

  • returns \(K_n(z)\).

Example

#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
std::cout.precision(16);
using w_t = eve::wide<double, eve::fixed<2>>;
auto z = kyosu::complex(w_t(20.0, 1.5), w_t(0.0, 1.5));
for(int n=2; n <= 10; ++n)
{
auto kn = kyosu::cyl_bessel_kn(n, z);
std::cout << "n " << n << ", z " << z << std::endl;
std::cout << "cyl_bessel_kn(n, z) " << kn << std::endl;
}
return 0;
}
constexpr tags::callable_complex complex
Constructs a kyosu::complex.
Definition: to_complex.hpp:70