Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Heuman Lambda Function

Synopsis
#include <boost/math/special_functions/heuman_lambda.hpp>
namespace boost { namespace math {

template <class T1, class T2>
calculated-result-type heuman_lambda(T1 k, T2 phi);

template <class T1, class T2, class Policy>
calculated-result-type heuman_lambda(T1 k, T2 phi, const Policy&);

}} // namespaces
Description

This function evaluates the Heuman Lambda Function Λ0(φ, k)

The return type of this function is computed using the __arg_pomotion_rules when the arguments are of different types: when they are the same type then the result is the same type as the arguments.

Requires -1 <= k <= 1, otherwise returns the result of domain_error (outside this range the result would be complex).

The final Policy argument is optional and can be used to control the behaviour of the function: how it handles errors, what level of precision to use etc. Refer to the policy documentation for more details.

Note that there is no complete analogue of this function (where φ = π / 2) as this takes the value 1 for all k.

Accuracy

These functions are trivially computed in terms of other elliptic integrals and generally have very low error rates (a few epsilon) unless parameter φ is very large, in which case the usual trigonometric function argument-reduction issues apply.

Table 6.69. Error rates for heuman_lambda

Microsoft Visual C++ version 12.0
Win32
double

GNU C++ version 5.1.0
linux
double

GNU C++ version 5.1.0
linux
long double

Sun compiler version 0x5130
Sun Solaris
long double

Elliptic Integral Jacobi Zeta: Mathworld Data

Max = 1.08ε (Mean = 0.734ε)

Max = 0ε (Mean = 0ε)

Max = 1.89ε (Mean = 0.887ε)

Max = 1.89ε (Mean = 0.887ε)

Elliptic Integral Heuman Lambda: Random Data

Max = 2.12ε (Mean = 0.59ε)

Max = 0ε (Mean = 0ε)

Max = 3.82ε (Mean = 0.609ε)

Max = 3.82ε (Mean = 0.608ε)


Testing

The tests use a mixture of spot test values calculated using values calculated at wolframalpha.com, and random test data generated using MPFR at 1000-bit precision and a deliberately naive implementation in terms of the Legendre integrals.

Implementation

The function is then implemented in terms of Carlson's integrals RJ and RF using the relation:

This relation fails for |φ| >= π/2 in which case the definition in terms of the Jacobi Zeta is used.


PrevUpHomeNext