Previous | Next --- Slide 6 of 79
Back to Lecture Thumbnails
traveling_saleswoman

Some documentation on all the variables for easy reference:

Inputs:
N = how many values we want to compute sin(x) for
x = array of N values
terms = number of terms we want to compute of the Taylor expansion
result = array of length N where the results are stored

i = the index of the array, with x[i] corresponding to the variable x in the sin equation
j = the current term that we are computing, with x being the 0th term (already included in "value" before the loop)