diff --git a/math/cos.c b/math/cos.c index 51bf1a7..f6c1764 100644 --- a/math/cos.c +++ b/math/cos.c @@ -3,14 +3,13 @@ /* Approximates the cosine of x. - Uses a taylor polynomial (roughly) accurate between 0 and - 2*pi to approximate the cosine. Any values of x outside this - range are modulo'd to be within this range (you know, 'cos - cosine is cyclic). + Uses a taylor polynomial accurate between 0 and 2*pi to approximate the + cosine. Any values of x outside this range are modulo'd to be within this + range (you know, 'cos cosine is cyclic). The taylor poly is centered at pi, with a radius of convergence of no less than pi, making it roughly accurate - between 0 and 2 * pi. The polynomial is up to x^10, which I've + between 0 and 2 * pi. The polynomial is up to x^16, which I've confirmed as being accurate being 0 and 2 * pi. */ double cos(double x) {