2 Approximating cos() Given an angle in degrees, we an approximate the cos function as follows 32400-4 Write a C function that implements the above equation. Use the following fumction prototype double cosapprox (double x.deg) The above approximation is only valid for a certain range of . We wish to determine the range of valus of where the approximation is valid. Compare the output of the above function to the output of the function given below //You must include ath.h for this function to work double cosd (double x deg) double pi,y Pi Pi-value(10); y = cos(x-deg * pi return (y) / 180'); Note: Yur program should call the function Pi.value froma problesn 1 for the calculation of Your main code should use the following steps Loop across values of x from-360 to 360 in steps of 1 degro . Calculate Y1 = cos-vprn(x); Calculate Y2 = coed(x) . Calculate the error between the two, err = |Y1-Y2] If err is small (say less than 0.0022) then approximation of cos valid . Report the range of x such that the approximation is a valid approximation 2 Approximating cos() Given an angle in degrees, we an approximate the cos function as follows 32400-4 Write a C function that implements the above equation. Use the following fumction prototype double cosapprox (double x.deg) The above approximation is only valid for a certain range of . We wish to determine the range of valus of where the approximation is valid. Compare the output of the above function to the output of the function given below //You must include ath.h for this function to work double cosd (double x deg) double pi,y Pi Pi-value(10); y = cos(x-deg * pi return (y) / 180'); Note: Yur program should call the function Pi.value froma problesn 1 for the calculation of Your main code should use the following steps Loop across values of x from-360 to 360 in steps of 1 degro . Calculate Y1 = cos-vprn(x); Calculate Y2 = coed(x) . Calculate the error between the two, err = |Y1-Y2] If err is small (say less than 0.0022) then approximation of cos valid . Report the range of x such that the approximation is a valid approximation