of the series is given by The final step is made particularly simple because , so the end of the recurrence is simply ; the term is added separately: Note that the algorithm requires only the evaluation of two trigonometric quantities and . Difference in meridian arc lengths Sometimes it necessary to compute the difference of two meridian arcs in a way that maintains high relative accuracy. This is accomplished by using trigonometric identities to write Clenshaw summation can be applied in this case provided we simultaneously compute and perform a matrix summation, where The first element of is the average value of and the second element is the average slope. satisfies the recurrence relation where takes the place of in the recurrence relation, and . The standard Clenshaw algorithm can now be applied to yield where are 2×2 matrices. Finally we have This technique can be used in the limit and to simultaneously compute and the derivative , provided that, in evaluating and , we take . See also Horner scheme to evaluate polynomials in monomial form De Casteljau's algorithm to evaluate polynomials in Bézier form References Numerical analysis