Syntax
#include <math.h> double sin(double x);Description
sin calculates the sine of x, with x expressed in radians. If x is too large, a partial loss of significance in the result may occur.
sin returns the value of the sine of x.
This example computes y as the sine of pi/2.
#include <math.h>
int main(void)
{
   double pi,x,y;
   pi = 3.1415926535;
   x = pi/2;
   y = sin(x);
   printf("sin( %lf ) = %lf\n", x, y);
   return 0;
   /****************************************************************************
      The output should be:
      sin( 1.570796 ) = 1.000000
   ****************************************************************************/
}
Related Information