80 #if defined (HAVE_CONFIG_H)
92 #define NAN octave_NaN
93 #define INFINITE lo_ieee_isinf
94 #define RUNI oct_randu()
95 #define RNOR oct_randn()
96 #define REXP oct_rande()
103 const double d = (a < 1. ? 1.+a : a) - 1./3.;
104 const double c = 1./sqrt (9.*d);
109 for (i=0; i < n; i++)
114 for (i=0; i < n; i++)
125 if (u >= 1.-0.0331*xsq*xsq && log (u) >= 0.5*xsq + d*(1-v+log (v)))
133 for (i = 0; i < n; i++)
134 r[i] *= exp (-
REXP/a);
150 #define NAN octave_Float_NaN
151 #define RUNI oct_float_randu()
152 #define RNOR oct_float_randn()
153 #define REXP oct_float_rande()
160 const float d = (a < 1. ? 1.+a : a) - 1./3.;
161 const float c = 1./sqrt (9.*d);
166 for (i=0; i < n; i++)
171 for (i=0; i < n; i++)
182 if (u >= 1.-0.0331*xsq*xsq && log (u) >= 0.5*xsq + d*(1-v+log (v)))
190 for (i = 0; i < n; i++)
191 r[i] *= exp (-
REXP/a);
F77_RET_T const double const double double * d
float oct_float_randg(float a)
void oct_fill_float_randg(float a, octave_idx_type n, float *r)
double oct_randg(double a)
void oct_fill_randg(double a, octave_idx_type n, double *r)
F77_RET_T const double * x