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

◆ ellint_2

auto eve::ellint_2 = functor<ellint_2_t>
inlineconstexpr

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
// Lanes masking
constexpr auto ellint_2[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 3
constexpr auto ellint_2[logical_value auto m](/*any of the above overloads*/) noexcept; // 3
}
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:132
constexpr auto ellint_2
elementwise_callable object computing the elliptic integrals of the second kind.
Definition ellint_2.hpp:93
constexpr auto phi
Callable object computing the golden ratio : .
Definition phi.hpp:77
EVE Main Namespace.
Definition abi.hpp:18

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^2\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^2\sin^2 t}\,\mathrm{d}t\) is returned.
  3. The operation is performed conditionnaly
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';
}
constexpr auto pio_2
Callable object computing the constant .
Definition pio_2.hpp:77
Lightweight type-wrapper.
Definition as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:332
Wrapper for SIMD registers.
Definition wide.hpp:86