You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cosine.m
    path of file: ./repos/code-backup/6th_sem/MATLAB/Assignment1
    
    the code of the file until where you have to start completion: %function ccos=cosine(x): Function to calculate cos(x) using Taylor Series
%expansion

function ccos=cosine(x)
    
function ccos=cosine(x): Function to calculate cos(x) using Taylor Series
%expansion

function ccos=cosine(x)
format long;
xrad=x*pi/180;
ccos=1;
pcos=0;
eps=abs(ccos-pcos);
sf=-1;
n=2;
while eps>1e-16
    pcos=ccos;
    fact=1;
    for i=1:n
        fact=fact*i;
    end