From ce4ab7f7d8e33aa790c78ede250f3496ac27aab3 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 18 Jan 2017 10:59:09 +0100 Subject: [PATCH 1/2] Unit test wblinv.m under Octave: adjust tolerance --- matlab/missing/stats/wblinv.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matlab/missing/stats/wblinv.m b/matlab/missing/stats/wblinv.m index f22f9278e..1b87c9fcb 100644 --- a/matlab/missing/stats/wblinv.m +++ b/matlab/missing/stats/wblinv.m @@ -155,7 +155,11 @@ t = exp(log(scale)+log(-log(1-proba))/shape); %$ if debug %$ [s, abs(p-s)] %$ end +%$ if isoctave +%$ t(k) = abs(p-s)<1e-10; +%$ else %$ t(k) = abs(p-s)<1e-12; +%$ end %$ end %$ end %$ end From 875497bc71f7c8e6256697557bedc48f382d1909 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 18 Jan 2017 11:01:13 +0100 Subject: [PATCH 2/2] Unit test lpdfgweibull.m: adjust upper integration bound under Octave Does not correctly integrate otherwise as more than 99% of support is 0 --- matlab/distributions/lpdfgweibull.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/distributions/lpdfgweibull.m b/matlab/distributions/lpdfgweibull.m index c99cba7cd..3f2df819d 100644 --- a/matlab/distributions/lpdfgweibull.m +++ b/matlab/distributions/lpdfgweibull.m @@ -279,7 +279,7 @@ end %$ %$ try %$ if isoctave -%$ s = quadv(xdens, .0000000001, 100000,1e-10) +%$ s = quadv(xdens, .0000000001, 20,1e-10) %$ else %$ s = integral(xdens, 0, 100000); %$ end