I changed some comments, whoopteedoo
This commit is contained in:
parent
c0639c609a
commit
99f4e3f267
1 changed files with 4 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue