E.V.E
v2022.03.00

◆ ellint_rg

eve::ellint_rg = {}
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\).

Defined in header

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
eve::common_compatible_value<T, U, V> ellint_rg(T x, U y, V z) noexcept;
}
Definition: value.hpp:103
constexpr callable_ellint_rg_ ellint_rg
Computes the Carlson's elliptic integral .
Definition: ellint_rg.hpp:56
Definition: all_of.hpp:22

Parameters

Return value

the value of the \(\mathbf{R}_\mathbf{G}\) Carlson elliptic integral is returned:

Example

#include <eve/module/elliptic.hpp>
#include <eve/wide.hpp>
#include <iostream>
int
main()
{
wide_ft pf = {1.0f, 0.0f, 1.5f, 3.0f};
wide_ft qf = {1.0f, 4.0f, 0.2f, 0.5f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<< "-> ellint_rc(pf, qf) = " << eve::ellint_rc(pf, qf) << '\n';
float xf = 3.0f;
float yf = 0.5f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<< "-> ellint_rc(xf, yf) = " << eve::ellint_rc(xf, yf) << '\n';
return 0;
}
constexpr callable_ellint_rc_ ellint_rc
computes the degenerate Carlson's elliptic integral .
Definition: ellint_rc.hpp:52
Wrapper for SIMD registers.
Definition: wide.hpp:65