Name

sin, sinf, sinl
- sine functions

Library

libm.lib

Synopsis

  #include <math.h>
  double sin (double x);
  float sinf (float x);
  long double sinl (long double x);

Return values

The sin and the sinf functions return the sine value.

Detailed description

The sin and the sinf functions compute the sine of x (measured in radians). A large magnitude argument may yield a result with little or no significance. sinl is just an alias to the function sin

Examples

#include <math.h>
int main( )
{
   double pi_by_6 = 0.52359877559829887307710723054658383 ;
   double y;
   y = sin( pi_by_6 );
   printf( "sin( %f)  = %f\n", x1,  y );
   y = sinf( pi_by_6);
   printf( "sinf( %f) = %f\n", pi_by_6, y );
   y = sinl( pi_by_6);
   printf( "sinl( %f) = %f\n", pi_by_6, y );
 }

         

Output

sin ( 0.52359877559829887307710723054658383 ) = 0.500000
sinf( 0.52359877559829887307710723054658383 ) = 0.500000
sinl( 0.52359877559829887307710723054658383 ) = 0.500000

         


See also

acos, asin, atan, atan2, cos, cosh, math, sinh, tan, tanh

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top