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

Detailed Description

Elliptic functions.

This module provides implementation for scalar and SIMD versions of elliptic functions.

Convenience header:

#include <eve/module/elliptic.hpp>

Variables

constexpr auto eve::am = functor<am_t>
 elementwise_callable object computing the Jacobi's Amplitude function.
constexpr auto eve::ellint_1 = functor<ellint_1_t>
 elementwise_callable object computing the elliptic integrals of the first kind.
constexpr auto eve::ellint_2 = functor<ellint_2_t>
 elementwise_callable object computing the elliptic integrals of the second kind.
constexpr auto eve::ellint_d = functor<ellint_d_t>
 elementwise_callable object computing the \(\mbox{D}\) elliptic integral.
constexpr auto eve::ellint_fe = functor<ellint_fe_t>
 elementwise_callable object computing the elliptic integrals of the first and second kind.
constexpr auto eve::ellint_rc = functor<ellint_rc_t>
 elementwise_callable object computing the degenerate Carlson's elliptic integral \( \mathbf{R}_\mathbf{C}(x, y) = \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)^{-1}\scriptstyle\;\mathrm{d}t\).
constexpr auto eve::ellint_rd = functor<ellint_rd_t>
 elementwise_callable object computing the Carlson's elliptic integral \( \mathbf{R}_\mathbf{D}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\).
constexpr auto eve::ellint_rf = functor<ellint_rf_t>
 Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{F}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\).
constexpr auto eve::ellint_rg = functor<ellint_rg_t>
 Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{G}(x, y) = \frac1{4\pi} \int_{0}^{2\pi}\int_{0}^{\pi} \scriptstyle\sqrt{x\sin^2\theta\cos^2\phi +y\sin^2\theta\sin^2\phi +z\cos^2\theta} \scriptstyle\;\mathrm{d}\theta\;\mathrm{d}\phi\).
constexpr auto eve::ellint_rj = functor<ellint_rj_t>
 Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{J}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle(t+p)^{-1}[(t+x)(t+y)(t+z)]^{-1/2}\scriptstyle\;\mathrm{d}t\).
constexpr auto eve::heuman_lambda = functor<heuman_lambda_t>
 elementwise_callable object computing the Heuman lambda function.
constexpr auto eve::jacobi_elliptic = functor<jacobi_elliptic_t>
 elementwise_callable object computing the Jacobi's sn, cn and dn function simultaneously.
constexpr auto eve::jacobi_zeta = functor<jacobi_zeta_t>
 elementwise_callable object computing the Jacobi Zeta function.

Variable Documentation

◆ am

auto eve::am = functor<am_t>
inlineconstexpr

elementwise_callable object computing the Jacobi's Amplitude function.

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> am(wphi, wf) = " << eve::am(wphi, wf) << "\n";
std::cout << "-> am[ignore_last(2)](wphi,wf)= " << eve::am[eve::ignore_last(2)](wphi, wf) << "\n";
std::cout << "-> am[wf != 1.0](wphi,wf) = " << eve::am[wf != -1.0f](wphi, wf) << "\n";
std::cout << "-> am(pio_2[lower], wf) = " << eve::am(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
std::cout << "-> am(pio_2[upper], wf) = " << eve::am(eve::pio_2[eve::upper](eve::as(wphi)), wf) << '\n';
}
constexpr auto lower
Guarantees a result no greater than the exact mathematical one.
Definition core.hpp:103
constexpr auto upper
Guarantees a result no smaller than the exact mathematical one.
Definition core.hpp:102
constexpr auto am
elementwise_callable object computing the Jacobi's Amplitude function.
Definition am.hpp:98
constexpr auto pio_2
Callable object computing the constant .
Definition pio_2.hpp:76
Lightweight type-wrapper.
Definition as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:361
Wrapper for SIMD registers.
Definition wide.hpp:94

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto am(floating_value auto u, floating_value auto x) noexcept; // 1
//Semantic modifiers
constexpr auto am[modular](floating_value auto u, floating_value auto alpha) noexcept; // 1
constexpr auto am[eccentric(floating_value auto u, floating_value auto k) noexcept; // 1
constexpr auto am[threshold = tol](floating_value auto u, floating_value auto x) noexcept;// 3
// Lanes masking
constexpr auto am[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto am[logical_value autolm](/*any of the above overloads*/) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
EVE Main Namespace.
Definition abi.hpp:19

Parameters

  • u: argument.
  • x: amplitude parameter ( \(0\le m\le 1\)).
  • alpha: modular angle given in radian (modular option).
  • m : elliptic modulus or eccentricity (eccentric option).
  • c: Conditional expression masking the operation.
  • l: Logical value masking the operation.

Return value

  1. return the jacobian amplitude function. Take care that the meaning of the second parameters depends on the option used (see note below).
  2. The operation is performed conditionally
  3. a threshold can be given controlling the needed accuracy.
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 (give the right option).

◆ ellint_1

auto eve::ellint_1 = functor<ellint_1_t>
inlineconstexpr

elementwise_callable object computing the elliptic integrals of the first kind.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_1(floating_value auto k) noexcept; // 1
constexpr auto ellint_1(floating_value auto phi, floating_value auto k) noexcept; // 2
constexpr auto ellint_2[modular](floating_value auto phi, floating_value auto alpha)noexcept; // 2
constexpr auto ellint_2[eccentric](floating_value auto phi, floating_value auto m) noexcept; // 2
// Lanes masking
constexpr auto ellint_1[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
constexpr auto ellint_1[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto ellint_1
elementwise_callable object computing the elliptic integrals of the first kind.
Definition ellint_1.hpp:96
constexpr auto ellint_2
elementwise_callable object computing the elliptic integrals of the second kind.
Definition ellint_2.hpp:96
constexpr auto phi
Callable object computing the golden ratio : .
Definition phi.hpp:80

Parameters

Return value

  1. the complete elliptic integral of the first kind \(\mathbf{K}(k) = \int_0^{\pi/2} \frac{\mathrm{d}t}{\sqrt{1-k^2\sin^2 t}}\). (corresponding to \( \phi = \pi/2 \)) is returned.
  2. the incomplete elliptic integral of the first kind is returned: \(\mathbf{F}(\phi, k) = \int_0^{\phi} \frac{\mathrm{d}t}{\sqrt{1-k^2\sin^2 t}}\)
  3. The operation is performed conditionally
Note
Be aware that as \(\pi/2\) is not exactly represented by floating point values the result of the incomplete function with a \(\phi\) floating point value representing \(\pi/2\) can differ a lot with the result of the complete call.

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> ellint_1(wf) = " << eve::ellint_1(wf) << "\n";
std::cout << "-> ellint_1(wphi, wf) = " << eve::ellint_1(wphi, wf) << "\n";
std::cout << "-> ellint_1[ignore_last(2)](wf)= " << eve::ellint_1[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> ellint_1[wf != 1.0](wf) = " << eve::ellint_1[wf != -1.0f](wf) << "\n";
std::cout << "-> ellint_1(pio_2[lower], wf) = " << eve::ellint_1(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
}

◆ ellint_2

auto eve::ellint_2 = functor<ellint_2_t>
inlineconstexpr

elementwise_callable object computing the elliptic integrals of the second kind.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_2(floating_value auto k) noexcept; // 1
constexpr auto ellint_2(floating_value auto phi, floating_value auto k) noexcept; // 2
constexpr auto ellint_2[modular](floating_value auto phi, floating_value auto alpha)noexcept; // 2
constexpr auto ellint_2[eccentric](floating_value auto phi, floating_value auto m) noexcept; // 2
// Lanes masking
constexpr auto ellint_2[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
constexpr auto ellint_2[logical_value auto l](/*any of the above overloads*/) noexcept; // 3
}

Parameters

Return value

  1. the complete ( corresponding to \( \phi = \pi/2 \) )of the second kind: \(\mathbf{E}(k) = \int_0^{\pi/2} \scriptstyle \sqrt{1-k\sin^2 t}\,\mathrm{d}t\) is returned.
  2. the incomplete elliptic integrals of the second kind: \( \mathbf{E}(\phi, k) = \int_0^{\phi} \scriptstyle \sqrt{1-k\sin^2 t}\,\mathrm{d}t\) is returned. \(\alpha\) is \(\sin k\) and \(m\) is \(\sqrt(k)\)
  3. The operation is performed conditionally
Note
Be aware that as \(\pi/2\) is not exactly represented by floating point values the result of the incomplete function with a \(\phi\) floating point value representing \(\pi/2\) can differ a lot with the result of the complete call.

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> ellint_2(wf) = " << eve::ellint_2(wf) << "\n";
std::cout << "-> ellint_2(wphi, wf) = " << eve::ellint_2(wphi, wf) << "\n";
std::cout << "-> ellint_2[ignore_last(2)](wf)= " << eve::ellint_2[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> ellint_2[wf != 1.0](wf) = " << eve::ellint_2[wf != -1.0f](wf) << "\n";
std::cout << "-> ellint_2(pio_2,wf) = " << eve::ellint_2(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
}

◆ ellint_d

auto eve::ellint_d = functor<ellint_d_t>
inlineconstexpr

elementwise_callable object computing the \(\mbox{D}\) elliptic integral.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_d(floating_value auto k) noexcept; // 1
constexpr auto ellint_d(floating_value auto phi, floating_value auto k) noexcept; // 2
// Lanes masking
constexpr auto ellint_d[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
constexpr auto ellint_d[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
}
constexpr auto ellint_d
elementwise_callable object computing the elliptic integral.
Definition ellint_d.hpp:94

Parameters

Return value

  1. the complete elliptic integral ( corresponding to \( \phi = \pi/2 \) ): \( \mathbf{D}(k) = \int_0^{\pi/2} \frac{\sin^2 t}{\sqrt{1-k^2\sin^2 t}} \scriptstyle\;\mathrm{d}t\) is returned.
  2. the incomplete elliptic integral of the first kind: \( \mathbf{D}(k) = \int_0^{\pi/2} \frac{\sin^2 t}{\sqrt{1-k^2\sin^2 t}} \scriptstyle\;\mathrm{d}t\) is returned:
Note
Be aware that as \(\pi/2\) is not exactly represented by floating point values the result of the incomplete function with a \(\phi\) floating point value representing \(\pi/2\) can differ a lot with the result of the complete call.

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> ellint_d(wf) = " << eve::ellint_d(wf) << "\n";
std::cout << "-> ellint_d(wphi, wf) = " << eve::ellint_d(wphi, wf) << "\n";
std::cout << "-> ellint_d[ignore_last(2)](wf)= " << eve::ellint_d[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> ellint_d[wf != 1.0](wf) = " << eve::ellint_d[wf != -1.0f](wf) << "\n";
std::cout << "-> ellint_d(pio_2[lower],wf) = " << eve::ellint_d(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
}

◆ ellint_fe

auto eve::ellint_fe = functor<ellint_fe_t>
inlineconstexpr

elementwise_callable object computing the elliptic integrals of the first and second kind.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_fe(floating_value auto k) noexcept; // 1
constexpr auto ellint_fe(floating_value auto phi, floating_value auto k) noexcept; // 2
constexpr auto ellint_fe[modular](floating_value auto phi, floating_value auto alpha)noexcept; // 2
constexpr auto ellint_fe[eccentric](floating_value auto phi, floating_value auto m) noexcept; // 2
}
constexpr auto ellint_fe
elementwise_callable object computing the elliptic integrals of the first and second kind.
Definition ellint_fe.hpp:93

Parameters

Return value

  1. the complete elliptic integral of the first and second kind \(\mathbf{K}(k) = \int_0^{\pi/2} \frac{\mathrm{d}t}{\sqrt{1-k^2\sin^2 t}}\) and \(\mathbf{E}(k) = \int_0^{\pi/2} \scriptstyle \sqrt{1-k^2\sin^2 t}\,\mathrm{d}t\) is returned. (corresponding to \( \phi = \pi/2 \)) are returned.
  2. the incomplete elliptic integral of the first kind is returned: \(\mathbf{F}(\phi, k) = \int_0^{\phi} \frac{\mathrm{d}t}{\sqrt{1-k^2\sin^2 t}}\)
Note
Be aware that as \(\pi/2\) is not exactly represented by floating point values the result of the incomplete function with a \(\phi\) floating point value representing \(\pi/2\) can differ a lot with the result of the complete call.

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> ellint_fe(wf) = " << eve::ellint_fe(wf) << "\n";
std::cout << "-> ellint_fe(wphi, wf) = " << eve::ellint_fe(wphi, wf) << "\n";
}

◆ ellint_rc

auto eve::ellint_rc = functor<ellint_rc_t>
inlineconstexpr

elementwise_callable object computing the degenerate Carlson's elliptic integral \( \mathbf{R}_\mathbf{C}(x, y) = \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)^{-1}\scriptstyle\;\mathrm{d}t\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_1(floating_value auto x, floating_value auto y) noexcept; // 1
// Lanes masking
constexpr auto ellint_1[conditional_expr auto c](floating_value auto x, floating_value auto y) noexcept; // 2
constexpr auto ellint_1[logical_value auto m](floating_value auto x, floating_value auto y) noexcept; // 2
}

Parameters

Return value

  1. the value of the Carlson degenerate elliptic integral: \(\mathbf{R}_\mathbf{C}(x, y) = \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)^{-1}\scriptstyle\;\mathrm{d}t\) is returned.
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide pf{1.0f, 0.0f, 1.5f, 3.0f};
eve::wide qf{1.0f, 4.0f, 0.2f, 0.5f};
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "-> ellint_rc(pf, qf) = " << eve::ellint_rc(pf, qf) << "\n";
std::cout << "-> ellint_rc[ignore_last(2)](pf, qf)= " << eve::ellint_rc[eve::ignore_last(2)](pf, qf) << "\n";
std::cout << "-> ellint_rc[qf != 4.0f](pf, qf) = " << eve::ellint_rc[qf != 4.0f](pf, qf) << "\n";
}
constexpr auto ellint_rc
elementwise_callable object computing the degenerate Carlson's elliptic integral .
Definition ellint_rc.hpp:81

◆ ellint_rd

auto eve::ellint_rd = functor<ellint_rd_t>
inlineconstexpr

elementwise_callable object computing the Carlson's elliptic integral \( \mathbf{R}_\mathbf{D}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_rd(floating_value auto x, floating_value auto y, floating_value auto z) noexcept; // 1
// Lanes masking
constexpr auto ellint_rd[conditional_expr auto c](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
constexpr auto ellint_rd[logical_value auto m](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
constexpr auto ellint_rd
elementwise_callable object computing the Carlson's elliptic integral .
Definition ellint_rd.hpp:83

Parameters

Return value

  1. the value of \( \mathbf{R}_\mathbf{D}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\) is returned.
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide pf{1.0f, 0.0f, 1.5f, 3.0f};
eve::wide qf{1.0f, 4.0f, 0.2f, 0.5f};
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "-> ellint_rc(pf, qf) = " << eve::ellint_rc(pf, qf) << "\n";
std::cout << "-> ellint_rc[ignore_last(2)](pf, qf)= " << eve::ellint_rc[eve::ignore_last(2)](pf, qf) << "\n";
std::cout << "-> ellint_rc[qf != 4.0f](pf, qf) = " << eve::ellint_rc[qf != 4.0f](pf, qf) << "\n";
}

◆ ellint_rf

auto eve::ellint_rf = functor<ellint_rf_t>
inlineconstexpr

Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{F}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_rf(floating_value auto x, floating_value auto y, floating_value auto z) noexcept; // 1
// Lanes masking
constexpr auto ellint_rf[conditional_expr auto c](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
constexpr auto ellint_rf[logical_value auto m](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
}
constexpr auto ellint_rf
Computes the Carlson's elliptic integral .
Definition ellint_rf.hpp:86

Parameters

Return value

  1. the value of the \(\mathbf{R}_\mathbf{F}\) Carlson elliptic integral: \( \mathbf{R}_\mathbf{F}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle[(t+x)(t+y)]^{-1/2} (t+z)^{-3/2}\scriptstyle\;\mathrm{d}t\). is returned
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide pf{1.0f, 0.0f, 1.5f, 3.0f};
eve::wide qf{1.0f, 4.0f, 0.2f, 0.5f};
eve::wide rf{2.0f, 1.0f, 0.1f, 0.4f};
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "<- rf = " << rf << "\n";
std::cout << "-> ellint_rf(pf, qf, rf) = " << eve::ellint_rf(pf, qf, rf) << "\n";
std::cout << "-> ellint_rf[ignore_last(2)](pf, qf, rf)= " << eve::ellint_rf[eve::ignore_last(2)](pf, qf, rf) << "\n";
std::cout << "-> ellint_rf[qf != 4.0f](pf, qf, rf) = " << eve::ellint_rf[qf != 4.0f](pf, qf, rf) << "\n";
}

◆ ellint_rg

auto eve::ellint_rg = functor<ellint_rg_t>
inlineconstexpr

Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{G}(x, y) = \frac1{4\pi} \int_{0}^{2\pi}\int_{0}^{\pi} \scriptstyle\sqrt{x\sin^2\theta\cos^2\phi +y\sin^2\theta\sin^2\phi +z\cos^2\theta} \scriptstyle\;\mathrm{d}\theta\;\mathrm{d}\phi\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_rg(floating_value auto x, floating_value auto y, floating_value auto z) noexcept; // 1
// Lanes masking
constexpr auto ellint_rg[conditional_expr auto c](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
constexpr auto ellint_rg[logical_value auto m](floating_value auto x, floating_value auto y,
floating_value auto z) noexcept; // 2
}
constexpr auto ellint_rg
Computes the Carlson's elliptic integral .
Definition ellint_rg.hpp:90

Parameters

Return value

  1. the value of the \(\mathbf{R}_\mathbf{G}\) Carlson elliptic integral: \(\frac1{4\pi} \int_{0}^{2\pi}\int_{0}^{\pi} \scriptstyle\sqrt{x\sin^2\theta\cos^2\phi +y\sin^2\theta\sin^2\phi +z\cos^2\theta} \scriptstyle\;\mathrm{d}\theta\;\mathrm{d}\phi\) is returned:
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide pf{1.0f, 0.0f, 1.5f, 3.0f};
eve::wide qf{1.0f, 4.0f, 0.2f, 0.5f};
eve::wide rf{2.0f, 1.0f, 0.1f, 0.4f};
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "<- rf = " << rf << "\n";
std::cout << "-> ellint_rg(pf, qf, rf) = " << eve::ellint_rg(pf, qf, rf) << "\n";
std::cout << "-> ellint_rg[ignore_last(2)](pf, qf, rf)= " << eve::ellint_rg[eve::ignore_last(2)](pf, qf, rf) << "\n";
std::cout << "-> ellint_rg[qf != 4.0f](pf, qf, rf) = " << eve::ellint_rg[qf != 4.0f](pf, qf, rf) << "\n";
}

◆ ellint_rj

auto eve::ellint_rj = functor<ellint_rj_t>
inlineconstexpr

Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{J}(x, y) = \frac32 \int_{0}^{\infty} \scriptstyle(t+p)^{-1}[(t+x)(t+y)(t+z)]^{-1/2}\scriptstyle\;\mathrm{d}t\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_rf(floating_value auto x, floating_value auto y,
floating_value auto z, floating_value auto p) noexcept; // 1
// Lanes masking
constexpr auto ellint_rf[conditional_expr auto c](floating_value auto x, floating_value auto y,
floating_value auto z, floating_value auto p) noexcept; // 2
constexpr auto ellint_rf[logical_value auto m](floating_value auto x, floating_value auto y,
floating_value auto z, floating_value auto p) noexcept; // 2
}

Parameters

Return value

  1. the value of the \(\mathbf{R}_\mathbf{J}\) Carlson elliptic integral: \( \frac32 \int_{0}^{\infty} \scriptstyle(t+p)^{-1}[(t+x)(t+y)(t+z)]^{-1/2}\;\mathrm{d}t\) is returned.
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide pf{1.0f, 0.0f, 1.5f, 3.0f};
eve::wide qf{1.0f, 4.0f, 0.2f, 0.5f};
eve::wide rf{2.0f, 1.0f, 0.1f, 0.4f};
eve::wide sf{0.19f, 0.5f, 0.87071f, 2.4f};
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "<- rf = " << rf << "\n";
std::cout << "<- sf = " << sf << "\n";
std::cout << "-> ellint_rj(pf, qf, rf, sf) = " << eve::ellint_rj(pf, qf, rf, sf) << "\n";
std::cout << "-> ellint_rj[ignore_last(2)](pf, qf, rf, sf)= " << eve::ellint_rj[eve::ignore_last(2)](pf, qf, rf, sf) << "\n";
std::cout << "-> ellint_rj[qf != 4.0f](pf, qf, rf, sf) = " << eve::ellint_rj[qf != 4.0f](pf, qf, rf, sf) << "\n";
}
constexpr auto ellint_rj
Computes the Carlson's elliptic integral .
Definition ellint_rj.hpp:91

◆ heuman_lambda

auto eve::heuman_lambda = functor<heuman_lambda_t>
inlineconstexpr

elementwise_callable object computing the Heuman lambda function.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto heuman_lambda(floating_value auto u, floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto heuman_lambda[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto heuman_lambda[logical_value autolm](/*any of the above overloads*/) noexcept; // 2
}
constexpr auto heuman_lambda
elementwise_callable object computing the Heuman lambda function.
Definition heuman_lambda.hpp:82

Parameters

Return value

  1. return the Heuman lambda value
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{0.9, 0.2, 0.75, 0.5};
eve::wide wphi{0.8, 1.0e-30, 0.5, 0.1};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> heuman_lambda(wphi, wf) = " << eve::heuman_lambda(wphi, wf) << "\n";
std::cout << "-> heuman_lambda[ignore_last(2)](wphi,wf)= " << eve::heuman_lambda[eve::ignore_last(2)](wphi, wf) << "\n";
std::cout << "-> heuman_lambda[wf != 1.0](wphi,wf) = " << eve::heuman_lambda[wf != -1.0f](wphi, wf) << "\n";
std::cout << "-> heuman_lambda(pio_2[lower], wf) = " << eve::heuman_lambda(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
std::cout << "-> heuman_lambda(pio_2[upper], wf) = " << eve::heuman_lambda(eve::pio_2[eve::upper](eve::as(wphi)), wf) << '\n';
}

◆ jacobi_elliptic

auto eve::jacobi_elliptic = functor<jacobi_elliptic_t>
inlineconstexpr

elementwise_callable object computing the Jacobi's sn, cn and dn function simultaneously.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto jacobi_elliptic(floating_value auto u, floating_value auto x) noexcept; // 1
//Semantic modifiers
constexpr auto jacobi_elliptic[modular](floating_value auto u, floating_value auto alpha) noexcept; // 1
constexpr auto jacobi_elliptic[eccentric(floating_value auto u, floating_value auto k) noexcept; // 1
constexpr auto jacobi_elliptic[threshold = tol](floating_value auto u, floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto jacobi_elliptic[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto jacobi_elliptic[logical_value autolm](/*any of the above overloads*/) noexcept; // 2
}
constexpr auto jacobi_elliptic
elementwise_callable object computing the Jacobi's sn, cn and dn function simultaneously.
Definition jacobi_elliptic.hpp:85

Parameters

Return value

  1. return a kumi::tuple containing sn``cn and dn values. Take care that the meaning of the second parameters depends on the option used (see note below).
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
auto [sn, cn, dn] = eve::jacobi_elliptic(wphi, wf);
std::cout << "-> sn = " << sn << std::endl;
std::cout << "-> cn = " << cn << std::endl;
std::cout << "-> dn = " << dn << std::endl;
std::cout << "-> jacobi_elliptic(pio_2[lower], wf) = " << eve::jacobi_elliptic(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
std::cout << "-> jacobi_elliptic(pio_2[upper], wf) = " << eve::jacobi_elliptic(eve::pio_2[eve::upper](eve::as(wphi)), wf) << '\n';
}

◆ jacobi_zeta

auto eve::jacobi_zeta = functor<jacobi_zeta_t>
inlineconstexpr

elementwise_callable object computing the Jacobi Zeta function.

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto jacobi_zeta(floating_value auto u, floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto jacobi_zeta[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto jacobi_zeta[logical_value autolm](/*any of the above overloads*/) noexcept; // 2
}
constexpr auto jacobi_zeta
elementwise_callable object computing the Jacobi Zeta function.
Definition jacobi_zeta.hpp:82

Parameters

Return value

  1. return the jacobi zeta value.
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> jacobi_zeta(wphi, wf) = " << eve::jacobi_zeta(wphi, wf) << "\n";
std::cout << "-> jacobi_zeta[ignore_last(2)](wphi,wf)= " << eve::jacobi_zeta[eve::ignore_last(2)](wphi, wf) << "\n";
std::cout << "-> jacobi_zeta[wf != 1.0](wphi,wf) = " << eve::jacobi_zeta[wf != -1.0f](wphi, wf) << "\n";
std::cout << "-> jacobi_zeta(pio_2[lower], wf) = " << eve::jacobi_zeta(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
std::cout << "-> jacobi_zeta(pio_2[upper], wf) = " << eve::jacobi_zeta(eve::pio_2[eve::upper](eve::as(wphi)), wf) << '\n';
}