E.V.E  0.1-beta

◆ ellint_rc

eve::ellint_rc = {}
inlineconstexpr

Callable object computing the degenerate Carlson's elliptic integral \( \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)^{-1}\scriptstyle\;\mathrm{d}t\).

Required header: #include <eve/function/ellint_rc.hpp>

Members Functions

Member Effect
operator() the ellint_rc operation
operator[] Construct a conditional version of current function object

auto operator()( floating_real_value auto x
, floating_real_value auto y) const noexcept;
Definition: value.hpp:103

Parameters

x, y: floating real values.

This computes the degenerate Carlson's elliptic integral

\[ R_C(x, y) = \frac12 \int_{0}^{\infty} (t+x)^{-1/2}(t+y)^{-1} \mbox{d}t\]

as described in Carlson, Numerische Mathematik, vol 33, 1 (1979)

Parameters x and y must be strictly positive and y non zero. In any other case the result is nan.

Return value

Returns elementwise the Carlson's integral.

The result type is the compatibility type of the three parameters.


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::ellint_rc

Parameters

cond : conditional expression

Return value

A Callable object so that the expression ellint_rc[cond](x, ...) is equivalent to if_else(cond,ellint_rc(x, ...),x)


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/ellint_rc.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
Callable object computing the degenerate Carlson's elliptic integral .
Definition: ellint_rc.hpp:85
Wrapper for SIMD registers.
Definition: wide.hpp:65