random_chisq Function

function random_chisq(ndf, first) result(fn_val)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndf
logical, intent(in) :: first

Return Value real


Calls

proc~~random_chisq~~CallsGraph proc~random_chisq random_chisq random_gamma random_gamma proc~random_chisq->random_gamma

Source Code

FUNCTION random_chisq(ndf, first) RESULT(fn_val)
  !     Generates a random variate from the chi-squared distribution with
  !     ndf degrees of freedom
  INTEGER, INTENT(IN) :: ndf
  LOGICAL, INTENT(IN) :: first
  REAL                :: fn_val
  fn_val = two * random_gamma(half*ndf, first)
  RETURN
END FUNCTION random_chisq