view test/bug-54490.tst @ 30947:fe898ae23e0e stable

betainc.m: Use sophisticated technique for calculating exponents to avoid innacuracies (bug #62329) * betainc.m: Use expm1() and log1p() to replace exponentiation operator ".^" in special case code when a or b equals 1. Add BIST tests for bug #62329.
author Nir Krakauer <nkrakauer@ccny.cuny.edu>
date Tue, 19 Apr 2022 15:09:27 -0700
parents 9080316864bf
children
line wrap: on
line source

%!function out = bug54490 ()
%!  global k;
%!  k = 1;
%!  out = 3;
%!endfunction

%!test <*54490>
%! global k;
%! k = 2;
%! a = [5, 6];
%! a(k) = bug54490 ();
%! assert (a, [5, 3]);
%! k = 2;
%! a = [5, 6];
%! [a(k)] = bug54490 ();
%! assert (a, [5, 3]);
%! clear -global k;  # cleanup after test