Generates an array of random integers from a binomial distribution, seeds and generator number passed explicitly
int binornd( long * v, uint n, int m, double p )
Return NE_NOERROR(0) on success, otherwise error.
EX1
//This example is to generate pseudo-random numbers from binomial distribution int binornd_ex1() { uint n = 20; int m = 6000; double p = 0.8; long v[20]; int nRet = binornd( v, n, m, p); if(0 != nRet) return 0; for(int i=0;i<n;i++) printf("v[%d]: %d\n",i, v[i]); return 1; }
betarnd
origin.h