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

Download this file

20 lines (16 with data), 483 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
function out=sin(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)
[out_rval{ii},out_ival{ii}] = mpfr_sinc (double (precision), xrval, xival);
else
out_rval{ii} = mpfr_sin (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