PHPSL Function:  bcSind( )

  • bcSind ($AngDeg)

    Dependencies: NONE


    This function computes the circular sine to up to 100 decimals for angular arguments in degrees rather than in radians.

    The decimals argument can range from $1$ to $100$, with default decimals = $16$.

    The circular sine value is computed from the series derived from Taylor's theorem, where $(x)$ is the angle expressed in natural radians:

    $ \begin{align*} x ~=~ \frac{degrees \cdot \pi}{180} ~ radians \end{align*} $



    $ \begin{align*} sin(x) = \sum^\infty_{n=0} \frac{(-1)^n \cdot {x}^{2n+1}}{(2n+1)!} = \frac{x^1}{1!} ~-~ \frac{x^3}{3!} ~+~ \frac{x^5}{5!} ~~-~~ \frac{x^7}{7!} ~+~ \frac{x^9}{9!} ~-~ \cdot \cdot~\cdot \end{align*} $

    Double-Click to select ALL code

    Double-Click to select ALL code


    EXAMPLE call results:
    
       print bcSind('60', 32);
    // =--> 0.86602540378443864676372317075293
    
    
       print bcSind('-22.35173', 40);
    // =--> -0.3802913385144120452500631279440739354945
    
    

    Reference(s):

    https://en.wikipedia.org/wiki/Taylor_series

Jay Tanner - 2024