Loading [MathJax]/extensions/tex2jax.js
kyosu v0.1.0
Complex Without Complexes
 
All Classes Namespaces Functions Variables Typedefs Modules Pages Concepts
Loading...
Searching...
No Matches

◆ ellint_rc

kyosu::ellint_rc = eve::functor<ellint_rc_t>
inlineconstexpr

Computes the Carlson's elliptic integral \( \mathbf{R}_\mathbf{C}(x, y) = \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)]^{-1}\;\mathrm{d}t\).

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ellint_rc(auto x, auto y) noexcept; // 1
// Lanes masking
constexpr auto ellint_rc[conditional_expr auto c](auto x, auto y) noexcept; // 2
constexpr auto ellint_rc[logical_value auto m](auto x, auto y) noexcept; // 2
}
constexpr auto ellint_rc
Computes the Carlson's elliptic integral .
Definition: ellint_rc.hpp:88

Parameters

  • x, y: Can be a mix of complex and real floating values. x, y must be non zero and have phase less in magnitude than \(\pi\), with the exception that x may be 0.
  • c: Conditional expression masking the operation.
  • m: Logical value masking the operation.

Return value

  1. the value of the Carlson degenerate elliptic integral: \(\mathbf{R}_\mathbf{C}(x, y) = \frac12 \int_{0}^{\infty} \scriptstyle(t+x)^{-1/2}(t+y)^{-1}\scriptstyle\;\mathrm{d}t\) is returned.
  2. The operation is performed conditionally

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
using wide_t = eve::wide <double, eve::fixed<4>>;
using r_t = double;
wide_t ref1 = { 3.0, 2.0, 1.0, 0.5};
wide_t imf1 = { 2.0, -1.0, -5.0, 0.0};
wide_t ref2 = { 0.0, 1.0, 2.0, 3.0};
wide_t imf2 = { 1.0f , -4.0, -2.0, 0.0};
auto pf = kyosu::complex_t<wide_t>(ref1, imf1);
auto qf = kyosu::complex_t<wide_t>(ref2, imf2);
int main()
{
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "-> ellint_rc(pf, qf) = " << kyosu::ellint_rc(pf, qf) << "\n";
}
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27