1 REAL function
gennf(dfn,dfd,xnonc)
57 qcond = dfn .LT. 1.0 .OR. dfd .LE. 0.0 .OR. xnonc .LT. 0.0
58 IF (.NOT. (qcond))
GO TO 10
59 WRITE (*,*)
'In GENNF - Either (1) Numerator DF < 1.0 or'
60 WRITE (*,*)
'(2) Denominator DF <= 0.0 or '
61 WRITE (*,*)
'(3) Noncentrality parameter < 0.0'
62 WRITE (*,*)
'DFN value: ',dfn,
'DFD value: ',dfd,
'XNONC value: ',
66 + (
'Degrees of freedom or noncent param out of range in GENNF')
71 10
IF (dfn.GE.1.000001)
GO TO 20
73 xnum = (
snorm() + sqrt(xnonc))**2
77 20 xnum = (2.0*
sgamma((dfn-1.0)/2.0) + (
snorm()+sqrt(xnonc))**2)/dfn
80 30 xden = 2.0*
sgamma(dfd/2.0)/dfd
85 IF (.NOT. (xden.LE. (1.0e-37*xnum)))
GO TO 40
86 WRITE (*,*)
' GENNF - generated numbers would cause overflow'
87 WRITE (*,*)
' Numerator ',xnum,
' Denominator ',xden
91 WRITE (*,*)
' GENNF returning 1.0E37'
real function gennf(dfn, dfd, xnonc)