carlson_elliptic_module Module

Carlson symmetric forms of elliptic integrals.

These routines are refactored versions of the ones from SLATEC. They have been converted into modern Fortran, and the documentation has been converted to FORD syntax.


Uses

  • module~~carlson_elliptic_module~~UsesGraph module~carlson_elliptic_module carlson_elliptic_module iso_fortran_env iso_fortran_env module~carlson_elliptic_module->iso_fortran_env

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, public, parameter:: carlson_elliptic_module_wp =wp
real(kind=wp), private, parameter, dimension(5):: d1mach =[tiny(1.0_wp), huge(1.0_wp), real(radix(1.0_wp), wp)**(-digits(1.0_wp)), epsilon(1.0_wp), log10(real(radix(1.0_wp), wp))]

Machine constants (replaces the old SLATEC D1MACH function)

The traditional D1MACH constants are: * D1MACH( 1) = B**(EMIN-1), the smallest positive magnitude. * D1MACH( 2) = B**EMAX*(1 - B**(-T)), the largest magnitude. * D1MACH( 3) = B**(-T), the smallest relative spacing. * D1MACH( 4) = B**(1-T), the largest relative spacing. * D1MACH( 5) = LOG10(B)


Functions

public function drc(x, y, ier)

Compute an approximation of the Carlson elliptic integral: where and .

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: x

nonnegative variable

real(kind=wp), intent(in) :: y

positive variable

integer, intent(out) :: ier

indicates normal or abnormal termination:

  • IER = 0: Normal and reliable termination of the routine. It is assumed that the requested accuracy has been achieved.
  • IER > 0: Abnormal termination of the routine:
  • IER = 1: x<0 or y<=0
  • IER = 2: x+y<LOLIM
  • IER = 3: max(x,y) > UPLIM

Return Value real(kind=wp)

public function drd(x, y, z, ier)

Compute an approximation for the incomplete or complete elliptic integral of the 2nd kind: Where , , , and .

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: x

nonnegative variable ()

real(kind=wp), intent(in) :: y

nonnegative variable ()

real(kind=wp), intent(in) :: z

positive variable

integer, intent(out) :: ier

indicates normal or abnormal termination:

  • IER = 0: Normal and reliable termination of the routine. It is assumed that the requested accuracy has been achieved.
  • IER > 0: Abnormal termination of the routine:
  • IER = 1: min(x,y) < 0
  • IER = 2: min(x + y, z ) < LOLIM
  • IER = 3: max(x,y,z) > UPLIM

Return Value real(kind=wp)

public function drf(x, y, z, ier)

Compute an approximation for the incomplete or complete elliptic integral of the 1st kind: Where , , , and at most one of them is .

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: x

nonnegative variable

real(kind=wp), intent(in) :: y

nonnegative variable

real(kind=wp), intent(in) :: z

nonnegative variable

integer, intent(out) :: ier

indicates normal or abnormal termination:

  • IER = 0: Normal and reliable termination of the routine. It is assumed that the requested accuracy has been achieved.
  • IER > 0: Abnormal termination of the routine:
  • IER = 1: min(x,y,z) < 0
  • IER = 2:min(x+y,x+z,y+z) < LOLIM
  • IER = 3: max(x,y,z) > UPLIM

Return Value real(kind=wp)

public function drj(x, y, z, p, ier)

Compute an approximation for the incomplete or complete elliptic integral of the 3rd kind: where , , and , and at most one of them , and .

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: x

nonnegative variable

real(kind=wp), intent(in) :: y

nonnegative variable

real(kind=wp), intent(in) :: z

nonnegative variable

real(kind=wp), intent(in) :: p

positive variable

integer, intent(out) :: ier

indicates normal or abnormal termination:

  • IER = 0: Normal and reliable termination of the routine. It is assumed that the requested accuracy has been achieved.
  • IER = 1: min(x,y,z) < 0.0_wp
  • IER = 2: min(x+y,x+z,y+z,p) < LOLIM
  • IER = 3: max(x,y,z,p) > UPLIM

Return Value real(kind=wp)