comparison scripts/specfun/betaincinv.m @ 32069:217a35f2a589 stable

betaincinv.m: Slightly increase test tolerance (for macOS 13). * scripts/specfun/betaincinv.m: Slightly increase test tolerance to pass on macOS 13.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 02 May 2023 11:32:58 +0200
parents 597f3ee61a48
children 2e484f9f1f18
comparison
equal deleted inserted replaced
32066:a46c30311908 32069:217a35f2a589
260 %!test 260 %!test
261 %! x = linspace (0.1, 0.9, 11); 261 %! x = linspace (0.1, 0.9, 11);
262 %! a = [0.1:0.1:1]; 262 %! a = [0.1:0.1:1];
263 %! [x,a,b] = ndgrid (x,a,a); 263 %! [x,a,b] = ndgrid (x,a,a);
264 %! xx = betaincinv (betainc (x, a, b, "upper"), a, b, "upper"); 264 %! xx = betaincinv (betainc (x, a, b, "upper"), a, b, "upper");
265 %! assert (xx, x, 5e-15); 265 %! assert (xx, x, 24*eps);
266 266
267 ## Test the conservation of the input class 267 ## Test the conservation of the input class
268 %!assert (class (betaincinv (0.5, 1, 1)), "double") 268 %!assert (class (betaincinv (0.5, 1, 1)), "double")
269 %!assert (class (betaincinv (single (0.5), 1, 1)), "single") 269 %!assert (class (betaincinv (single (0.5), 1, 1)), "single")
270 %!assert (class (betaincinv (0.5, single (1), 1)), "single") 270 %!assert (class (betaincinv (0.5, single (1), 1)), "single")