Computes the \(\mbox{D}\) elliptic integrals : \( \mathbf{D}(\phi, k) = \int_0^{\phi} \frac{\sin^2 t}{\sqrt{1-k^2\sin^2 t}}
\scriptstyle\;\mathrm{d}t\) and \( \mathbf{D}(k) = \int_0^{\pi/2} \frac{\sin^2 t}{\sqrt{1-k^2\sin^2 t}}
\scriptstyle\;\mathrm{d}t\).
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.
Defined in Header
#include <eve/module/elliptic.hpp>
{
template< eve::floating_ordered_value T >
template< eve::floating_ordered_value T, eve::floating_ordered_value U >
}
constexpr callable_ellint_d_ ellint_d
Computes the elliptic integrals : and .
Definition: ellint_d.hpp:69
constexpr callable_phi_ phi
Callable object computing the golden ratio : .
Definition: phi.hpp:49
typename eve::detail::common_value_impl< void, Ts... >::type common_value_t
Computes the SIMD-compatible common type between all Ts.
Definition: common_value.hpp:50
- complete \(\mbox{D}\) elliptic integrals.
- incomplete \(\mbox{D}\) elliptic integrals.
Parameters
Return value
- the complete elliptic integral ( corresponding to \( \phi = \pi/2 \) ) is returned.
- the incomplete elliptic integral of the first kind is returned:
#include <eve/module/elliptic.hpp>
#include <eve/wide.hpp>
#include <iostream>
int
main()
{
wide_ft pf = {1.0f, 0.1f, 0.75f, 0.5f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = 0.1f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
wide_ft
phi = {0.2f, 1.0e-30f, 0.5f, 0.3f};
std::cout << "---- simd" << '\n'
<<
"<- phi = " <<
phi <<
'\n'
<< "<- pf = " << pf << '\n'
}
Wrapper for SIMD registers.
Definition: wide.hpp:65