Use the Taylor series:
to write a program to compute cos x correct to four decimal places (x is in radians). See how many terms are needed to get four-figure agreement with the MATLAB function cos. Don't make x too large; that could cause rounding error