%Implementation of sinc(x)=sin(x)/x

function y = my_sinc(x)

%sinc(x)= sin(x)/x =\sum_{k=0}{\infty} x^{2k}(-1)^k/(2k+1)!
if (abs(x)<1e-3)
	xSq = x*x;
	
	kSummand = 1;
	y = 1;
	k = 1;
	do
		kSummand = kSummand*(-xSq)/((2*k+1)*2*k);
		y = y + kSummand;
		k = k + 1;
	until (abs(kSummand)<1e-15)
else
	y = sin(x)/x;
endif	