the number of terms in the taylor series needed to approximate a function depends on the desired accuracy. one way to measure the accuracy of a variable is using the relative error. suppose that is the approximation of the variable , the relative error is defined as: