Talk:Trigonometric functions: Difference between revisions
m
minor optimization x2=x**2
Walterpachl (talk | contribs) m (typos corrected) |
Walterpachl (talk | contribs) m (minor optimization x2=x**2) |
||
Line 158:
term=x /* first term */
Sum=x /* first value */
x2=x**2 /* loop invariant x-square */
do i=3 by 2 /* now work the series */
f=i*(i-1) /* next factorial part */
term=-term*
NewSum=Sum+Term /* new value */
If NewSum=Sum Then Leave /* convergence reached */
|