Mercurial > hg > octave-lojdl
changeset 6198:0b190c343471
[project @ 2006-12-05 14:06:50 by jwe]
author | jwe |
---|---|
date | Tue, 05 Dec 2006 14:06:51 +0000 |
parents | c67c11e22828 |
children | 7f7f612eac06 |
files | liboctave/ChangeLog liboctave/randpoisson.c src/ChangeLog src/DLD-FUNCTIONS/rand.cc |
diffstat | 4 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2006-12-05 Paul Kienzle <pkienzle@users.sf.net> + + * randpoisson.c (oct_fill_randp): For lambda > 1e8, upper limit of + loop is n, not L. + 2006-11-30 John W. Eaton <jwe@octave.org> * lo-utils.cc (octave_read_double, read_inf_nan_na):
--- a/liboctave/randpoisson.c +++ b/liboctave/randpoisson.c @@ -400,7 +400,7 @@ { /* normal approximation: from Phys. Rev. D (1994) v50 p1284 */ const double sqrtL = sqrt(L); - for (i = 0; i < L; i++) + for (i = 0; i < n; i++) { p[i] = floor(RNOR*sqrtL + L + 0.5); if (p[i] < 0.0)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-12-05 Paul Kienzle <pkienzle@users.sf.net> + + * DLD-FUNCTIONS/rand.cc: Test for Poisson generator with lambda > 1e8. + 2006-12-04 David Bateman <dbateman@free.fr> * data.cc (Fdata): If ndims is greater than nargout and
--- a/src/DLD-FUNCTIONS/rand.cc +++ b/src/DLD-FUNCTIONS/rand.cc @@ -809,7 +809,7 @@ %!assert(randp([-inf,-1,0,inf,nan]),[nan,nan,0,nan,nan]); % *** Please report %!test %! % statistical tests may fail occasionally. -%! for a=[5 15] +%! for a=[5 15 1e9] %! x = randp(a,100000,1); %! assert(min(x)>=0); % *** Please report this!!! *** %! assert(mean(x),a,0.03); @@ -819,7 +819,7 @@ %! end %!test %! % statistical tests may fail occasionally. -%! for a=[5 15] +%! for a=[5 15 1e9] %! x = randp(a*ones(100000,1),100000,1); %! assert(min(x)>=0); % *** Please report this!!! *** %! assert(mean(x),a,0.03); @@ -832,7 +832,7 @@ %!assert(randp([-inf,-1,0,inf,nan]),[nan,nan,0,nan,nan]); % *** Please report %!test %! % statistical tests may fail occasionally. -%! for a=[5 15] +%! for a=[5 15 1e9] %! x = randp(a,100000,1); %! assert(min(x)>=0); % *** Please report this!!! *** %! assert(mean(x),a,0.03); @@ -842,7 +842,7 @@ %! end %!test %! % statistical tests may fail occasionally. -%! for a=[5 15] +%! for a=[5 15 1e9] %! x = randp(a*ones(100000,1),100000,1); %! assert(min(x)>=0); % *** Please report this!!! *** %! assert(mean(x),a,0.03);