# HG changeset patch # User Jaroslav Hajek # Date 1232716255 -3600 # Node ID ec487788828572644d804b366b785b6ce57dd64d # Parent 553874dbba84d718d01edac8a77fc50c1efcd5cf use relative tols in randp tests diff -r 553874dbba84 -r ec4877888285 src/ChangeLog --- a/src/ChangeLog Tue Oct 21 21:59:59 2008 -0400 +++ b/src/ChangeLog Fri Jan 23 14:10:55 2009 +0100 @@ -1,3 +1,7 @@ +2009-01-23 Jaroslav Hajek + + * DLD-FUNCTIONS/ranpd.cc: Use relative tolerance for randp tests. + 2008-12-26 Francesco Potortì * data.cc (resize): Add cross reference to postpad. diff -r 553874dbba84 -r ec4877888285 src/DLD-FUNCTIONS/rand.cc --- a/src/DLD-FUNCTIONS/rand.cc Tue Oct 21 21:59:59 2008 -0400 +++ b/src/DLD-FUNCTIONS/rand.cc Fri Jan 23 14:10:55 2009 +0100 @@ -938,7 +938,7 @@ %!test %! % Test fixed state %! randp("state",1); -%! assert(randp(1e9,1,6),[999915677 999976657 1000047684 1000019035 999985749 999977692],1e-6) +%! assert(randp(1e9,1,6),[999915677 999976657 1000047684 1000019035 999985749 999977692],-1e-6) %!test %! % Test fixed state %! randp("seed",1); @@ -951,7 +951,7 @@ %!test %! % Test fixed state %! randp("seed",1); -%! assert(randp(1e9,1,6),[1000006208 1000012224 999981120 999963520 999963072 999981440],1e-6) +%! assert(randp(1e9,1,6),[1000006208 1000012224 999981120 999963520 999963072 999981440],-1e-6) %!test %! if (__random_statistical_tests__) %! % statistical tests may fail occasionally.