CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Pages

Valid RSS

CMath.h

sin

About | FAQ | Contact
About FAQ Contact

Sine function

viewed 35125 times


+View other versions (3)
Contents -

Interface

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

#include <complex.h>
complex sin (complex x)
double complex csin (double complex x)
float complex csinf (float complex x)
long double complex csinl (long double complex x)

Description

The sin functions compute the sine of x (measured in radians).

The complex sine is defined by
Example 1:
#include <stdio.h>
#include <math.h>
 
int main(void)
{
  double x = 0.31415926;
  double result = sin(x);
  printf("The sine of %lf is %lf\n", x, result);
  return 0;
}

Output:
The sine of 0.314159 is 0.309017

Special Values

sin ( ±0 ) returns ±0.
sin ( ±∞ ) returns a NaN and raises the invalid floating-point exception.

See Also

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

Standards

The sin function conforms to ISO/IEC 9899:1999(E).

Compatibility

DOSUNIXWindowsANSI CC++
sinl
Real sin
Complex sin
Complex csin

Last Modified: 2009-11-01 08:43:09     Page Rendered: 2010-03-15 00:53:16

Page Comments

Format Excel Equations

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional