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

◆ ellint_1

auto eve::ellint_1 = functor<ellint_1_t>
inlineconstexpr

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
// 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
}
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_1
elementwise_callable object computing the elliptic integrals of the first kind.
Definition ellint_1.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 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 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_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';
}
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