[dc5f16]: @mp / gamma.m  Maximize  Restore  History

Download this file

20 lines (16 with data), 505 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
function out = gamma(x)
precision = x(1).precision;
out_rval = cell (size (x));
out_ival = cell (size (x));
for ii = (1:numel (x))
imag = false;
[xrval, xival] = getVals (x, ii);
if (hasimag (xival))
error ('argument of gamma function for mp objects must be real');
else
out_rval{ii} = mpfr_gamma (double (precision), xrval);
end
end % for ii=1:max(ex,
out = class (struct ('rval', out_rval,...
'ival', out_ival,...
'precision', precision), 'mp');

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks