comparison libcruft/ranlib/ignnbn.f @ 10103:0e71ead7359d

Use CALL XSTOPX instead of STOP in Fortran ranlib routines New call allows Octave's error handler to intercept otherwise fatal errors in Fortran code
author Rik <rdrider0-list@yahoo.com>
date Wed, 13 Jan 2010 22:22:46 -0800
parents df7c57a6639d
children
comparison
equal deleted inserted replaced
10102:8b4e3388a254 10103:0e71ead7359d
57 INTRINSIC real 57 INTRINSIC real
58 C .. 58 C ..
59 C .. Executable Statements .. 59 C .. Executable Statements ..
60 C Check Arguments 60 C Check Arguments
61 C JJV changed argumnet checker to abort if N <= 0 61 C JJV changed argumnet checker to abort if N <= 0
62 IF (n.LE.0) STOP 'N <= 0 in IGNNBN' 62 IF (n.LE.0) CALL XSTOPX ('N <= 0 in IGNNBN')
63 IF (p.LE.0.0) STOP 'P <= 0.0 in IGNNBN' 63 IF (p.LE.0.0) CALL XSTOPX ('P <= 0.0 in IGNNBN')
64 IF (p.GE.1.0) STOP 'P >= 1.0 in IGNNBN' 64 IF (p.GE.1.0) CALL XSTOPX ('P >= 1.0 in IGNNBN')
65 65
66 C Generate Y, a random gamma (n,(1-p)/p) variable 66 C Generate Y, a random gamma (n,(1-p)/p) variable
67 C JJV Note: the above parametrization is consistent with Devroye, 67 C JJV Note: the above parametrization is consistent with Devroye,
68 C JJV but gamma (p/(1-p),n) is the equivalent in our code 68 C JJV but gamma (p/(1-p),n) is the equivalent in our code
69 10 r = real(n) 69 10 r = real(n)