envj Function

function envj(n, x)

************80

! ENVJ is a utility function used by MSTA1 and MSTA2.

Licensing:

This routine is copyrighted by Shanjie Zhang and Jianming Jin.  However,
they give permission to incorporate this routine into a user program
provided that the copyright is acknowledged.

Modified:

14 March 2012

Author:

Shanjie Zhang, Jianming Jin

Reference:

Shanjie Zhang, Jianming Jin,
Computation of Special Functions,
Wiley, 1996,
ISBN: 0-471-11963-6,
LC: QA351.C45.

Parameters:

Input, integer ( kind = 4 ) N, ?

Input, real ( kind = 8 ) X, ?

Output, real ( kind = 8 ) ENVJ, ?

Arguments

Type IntentOptional Attributes Name
integer(kind=4) :: n
real(kind=8) :: x

Return Value real(kind=8)


Source Code

function envj ( n, x )

  !*****************************************************************************80
  !
  !! ENVJ is a utility function used by MSTA1 and MSTA2.
  !
  !  Licensing:
  !
  !    This routine is copyrighted by Shanjie Zhang and Jianming Jin.  However, 
  !    they give permission to incorporate this routine into a user program 
  !    provided that the copyright is acknowledged.
  !
  !  Modified:
  !
  !    14 March 2012
  !
  !  Author:
  !
  !    Shanjie Zhang, Jianming Jin
  !
  !  Reference:
  !
  !    Shanjie Zhang, Jianming Jin,
  !    Computation of Special Functions,
  !    Wiley, 1996,
  !    ISBN: 0-471-11963-6,
  !    LC: QA351.C45.
  !
  !  Parameters:
  !
  !    Input, integer ( kind = 4 ) N, ?
  !
  !    Input, real ( kind = 8 ) X, ?
  !
  !    Output, real ( kind = 8 ) ENVJ, ?
  !
  implicit none

  real ( kind = 8 ) envj
  integer ( kind = 4 ) n
  real ( kind = 8 ) x

  envj = 0.5D+00 * log10 ( 6.28D+00 * n ) - n * log10 ( 1.36D+00 * x / n )

  return
end function envj