function [c3] = VC_nasob(c1, c2)
% function [c3] = VC_nasob(c1, c2)
% c1, c2 ... velka cisla jako pole uint64
% c3=c1*c2


l1=length(c1);
l2=length(c2);


% l3=l1+l2; % max delka vysledku

% c3 = zeros(1, l3, 'uint64');
c3 = zeros(1, 1, 'uint64');


for k = 1:l2
    prenos=0;
    pc=zeros(1, l1+k, 'uint64');
    for l= 1:l1
        c=c2(k)*c1(l);
        r=mod(c,1e9);
        pc(l+k-1)=r+prenos;
        prenos=(c-r)/1e9;
    end
    if prenos>0
        pc(end)=prenos;
    else
        pc(end)=[];
    end
    c3=VC_secti(c3,pc);
end
    
end % funkce
