5903 Intro Scientific Prog:
CORDIC: Specification
- The program should compute sin(x) for a given
list of input floats (redirectable from a file) all of which are
between 0 and 1 in three different ways.
- You should create two procedures in seperate input files.
One computes the sine using the CORDIC
algorithm (see for example the Wikipedia discussion) with 32
iterations. The second computes the sine using a truncated
Maclaurin polynomial of order 6 in nested or Horner form.
- Each line of the output should be the xvalue followed by
the CORDIC, then Maclaurin, then C-library values of sine. The
values
should be seperated by two spaces.
- Test your code..
- By commenting out portions of the code and creating a large test file estimate the speed of
each sine computation. Include a discussion of the speed and accuracy in the README
file.