## Infinite Series for the Sine Function

This program will use one of the many infinite series formulas to calculate an approximate value for the sine function. This infinite series for the sine function is the Taylor series and for this case is the same as the Maclaurin series for the sine function.

This particular infinite series converges rapidly, the first 8 tems are within about 0.000000000000001 of the actual value of the sine value. Reminder, the factorial symbol in math "!" means, for n!, to multiply by n(n-1)(n-2) until n(1), Note: 0! = 1 by definition. For example: 4! = 4*3*2*1 = 24.

Javascript numbers are always double-precision 64 bit binary (base 2) numbers. There is no "double precision" type.

The infinite series for sin(x) where x is in radians and x is a Real number is:

sin(x) = x1/1! - x3/3! + x5/5! - x7/7! + x9/9!...the pattern continues to infinity.

This series is an alternating series, that is, the terms alternate between plus and minus.

This program is written in JavaScript.

By Mr. C. March, 2020

Enter angle in radians, default is pi/3 ~ 1.047197551

Enter number of terms to sum, max is 10, default is 8.

*********************results********************************