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

◆ jacobi_elliptic

kyosu::jacobi_elliptic = eve::functor<jacobi_elliptic_t>
inlineconstexpr

Computes Jacobi's Amplitude function.

#include <kyosu/functions.hpp>

Callable Signatures

namespace kyosu
{
// Regular overload
template<concepts::complex_like Z, concepts::real U> constexpr auto jacobi_elliptic Z z, U m) noexcept;
//Semantic modifiers
template<concepts::complex_like Z, concepts::real U> constexpr Z jacobi_elliptic[modular](Z z, U alpha) noexcept;
template<concepts::complex_like Z, concepts::real U> constexpr Z jacobi_elliptic[eccentric](Z z, U k) noexcept;
template<concepts::complex_like Z, concepts::real U> constexpr Z jacobi_elliptic[threshold = tol](Z z, U m) noexcept;
template<concepts::complex_like Z, concepts::real U> constexpr Z jacobi_elliptic[threshold = tol][modular](Z z, U alpha) noexcept;
template<concepts::complex_like Z, concepts::real U> constexpr Z jacobi_elliptic[threshold = tol][eccentric](Z z, U k) noexcept;
}
constexpr auto k
Computes the complex number k i.e. quaternion(0, 0, 0, 1) in the chosen type.
Definition: k.hpp:72
constexpr auto jacobi_elliptic
Computes Jacobi's Amplitude function.
Definition: jacobi_elliptic.hpp:92
Main KYOSU namespace.
Definition: cinf.hpp:13

Parameters

  • u: argument.
  • m: amplitude parameter ( \(0\le m\le 1\)).
  • alpha: modular angle in radian.
  • k: elliptic modulus (eccentricity) .
  • ‘tol’: accuracy tolerance (by defaut epsilon.
  • c: Conditional expression masking the operation.
  • l: Logical value masking the operation.

Return value

  • returns the jacobian amplitude function. Take care that the meaning of the second parameters depends on the option(s) used (see note below).
  • The threshold option can be used to choose an accuracy tolerance.
Note
  • \(\alpha\) is named the modular angle given in radian (modular option).
  • \( k = \sin\alpha \) is named the elliptic modulus or eccentricity (eccentric option).
  • \( m = k^2 = \sin^2\alpha\) is named the parameter (no option). Each of the above three quantities is completely determined by any of the others (given that they are non-negative). Thus, they can be used interchangeably up to roundings errors by giving the right option.

External references

Example

#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
int main()
{
std::cout<< std::setprecision(16) << std::endl;
using w_t = eve::wide<double, eve::fixed<2>>;
auto z = kyosu::complex(w_t(2.0, 1.0), w_t(0.0, 1.0));
auto m = w_t(0.5, 0.7);
auto [sn, cn, dn] = kyosu::jacobi_elliptic(z, m);
std::cout << " z " << z << std::endl;
std::cout << " m " << m << std::endl;
std::cout << "sn(z, m) " << sn << std::endl;
std::cout << "cn(z, m) " << cn << std::endl;
std::cout << "dn(z, m) " << dn << std::endl;
return 0;
}
constexpr auto complex
Constructs a kyosu::complex_t instance.
Definition: to_complex.hpp:75