double rangam(double a) { /** generate gamma deviate mean a */ if (a < 1.0) { return( randev0(a)); } if (a == 1.0) { return( ranexp()); } return( randev1(a)); }
double rangam(double a) { /** generate gamma deviate mean a */ if (a<=0.0) { fatalx("rangam called with bad param. a: %9.3f\n", a) ; } if (a < 1.0) { return( randev0(a)); } if (a == 1.0) { return( ranexp()); } return( randev1(a)); }