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

◆ ellint_d

auto eve::ellint_d = functor<ellint_d_t>
inlineconstexpr

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
}
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_d
elementwise_callable object computing the elliptic integral.
Definition ellint_d.hpp:94
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 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';
}
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:70