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

◆ cyl_bessel_ik

kyosu::cyl_bessel_ik = {}
inlineconstexpr

Computes the modified Bessel functions \(I\) and \(K\),.

#include <kyosu/functions.hpp>

Callable Signatures

namespace kyosu
{
template<eve::floating_scalar_ordered_value N, eve::floating_ordered_value T, complexRange R>
constexpr auto cyl_bessel_ik(N nu, T z, R& js, R& ys) noexcept;
template<eve::floating_scalar_ordered_value N, conceots::kyosu::complex Z, complexRange R>
constexpr T cyl_bessel_ik(N n, Z z, R& js, R& ys) noexcept;
}
constexpr tags::callable_cyl_bessel_ik cyl_bessel_ik
Computes the modified Bessel functions and ,.
Definition: cyl_bessel_ik.hpp:91
Main KYOSU namespace.
Definition: types.hpp:14

Parameters

  • nu: scalar order of the function not necessarily integral.
  • z: Value to process.
  • js: range able to contain int(nu)+1 complex values (of type complex_t<T> or Z respectively) *ys: range able to contain int(nu)+1 complex values (of type complex_t<T> or Z respectively)

Return value

  • returns the kumi pair \(\{I_\nu(z), K_\nu(z)\}\) of complex values.

*Ouput values

  • on output js contains the values of \(((I_{\nu_0+\epsilon i})_{i = 0\cdot n}\)
  • on output ys contains the values of \(((K_{\nu_0+\epsilon i})_{i = 0\cdot n}\)

    where \(\nu_0\) is the fractional part of \(\nu\), \(\nu = \nu_0+\epsilon n\) and \(\epsilon\) is the sign of \(\nu\) .

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));
auto v = 3.3;
std::cout << "z " << z << std::endl;
std::vector<kyosu::complex_t<w_t>> is(4), ks(4);
kyosu::cyl_bessel_ik(v, z, is, ks);
for(int n=0; n <= 3; ++n)
{
std::cout << "is[" << n << "] = " << is[n] << std::endl;
std::cout << "ks[" << n << "] = " << ks[n] << std::endl;
}
return 0;
}
constexpr tags::callable_complex complex
Constructs a kyosu::complex.
Definition: to_complex.hpp:70