Write a function, cos(x), using the expansion below and use it in a program to find the cosine of values read until EOF. ONLY USE STDIO.H NOT MATH.H
Here you will be writing a function:
to compute the cos of an angle (given in radians) using the Taylor series shown. Your function should find the value of the cos for ANY angle (preferred) or at least angles up to 2 PI (Hint: if you can do the later, the former should be easy) to a precision of 4 decimal places (within 0.00005). You should put the function cos() in the file called trig.c. You should write functions for factorial() and close_enough() in the file called util.c. This last function is given two doubles and returns true if they are within 0.00005 of each other. You can put any other functions you may want in util.c as well. You will need to provide your own .h files for each of these .c files. You should also write a simple test driver to exercise your function in the file driver1.c. You should update the makefile to compile and link driver1.c, trig.c, util.c and exponent.c when you type
and create the executable called trig.
10 freelancers are bidding on average $41 for this job
Hi there! I am able to do your project. You can view my profile to make sure that I am a right person. Regards, Valentin Relevant Skills and Experience c, math Proposed Milestones $40 USD - price
I have done this before. I have good experience and knowledge in numerical methods and it's implementation using any language. I'll implement Taylor series as you want.