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

◆ cyl_bessel_h12

kyosu::cyl_bessel_h12 = {}
inlineconstexpr

Computes the Bessel functions of the third kind \( H^{(1)} \) and \( H^{(2)} \),.

#include <kyosu/functions.hpp>

Callable Signatures

namespace kyosu
{
template<eve::floating_scalar_value N, eve::floating_ordered_value T, complexRange R1, complexRange R2>
constexpr auto cyl_bessel_h12(N nu, T z, R1& h1s, R2& h2s) noexcept;
template<eve::floating_scalar_value N, conceots::kyosu::complex Z, complexRange R1, complexRange R2>
constexpr T cyl_bessel_h12(N nu, Z z, R1& h1s, R2& h2s) noexcept;
}
constexpr tags::callable_cyl_bessel_h12 cyl_bessel_h12
Computes the Bessel functions of the third kind and ,.
Definition: cyl_bessel_h12.hpp:87
Main KYOSU namespace.
Definition: types.hpp:14

Parameters

  • n: scalar floating order of the function.
  • z: Value to process.
  • h1s: range able to containn = int(abs(nu))+1complex values (of type complex_t<T> or Z respectively) *h2s: range able to contain n = int(abs(nu))+1 complex values (of type complex_t<T> or Z respectively)

Return value

  • returns the kumi pair \( \{ H^{(1)}_\nu(z). H^{(2)}_\nu(z) \} \).

*Ouput values

  • on output (if present) h1s and h2s contains the values of \( (H^{(1\|2)}_{\nu_0+\epsilon i})_{i = 0 \cdots n} \) respectively, where \( \nu_0 \) is the fractional part of \(\nu\) 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<decltype(z)> h1(4), h2(4);
kyosu::cyl_bessel_h12(v, z, h1, h2);
for(int n=0; n <= 3; ++n)
{
std::cout << "h1[" << n << "] = " << h1[n] << std::endl;
std::cout << "h2[" << n << "] = " << h2[n] << std::endl;
}
return 0;
}
constexpr tags::callable_complex complex
Constructs a kyosu::complex.
Definition: to_complex.hpp:70