sin, sinl
Go Up to math.h Index
Header File
math.h
Category
Math Routines
Prototype
double sin(double x);
long double sinl(long double x);
Description
Calculates sine.
sin computes the sine of the input value. Angles are specified in radians.
sinl is the long double version; it takes a long double argument and returns a long double result. Error handling for these functions can be modified through the functions _matherr and _matherrl.
Return Value
sin and sinl return the sine of the input value.
Example
#include <stdio.h> #include <math.h> int main(void) { double result, x = 0.5; result = sin(x); printf("The sin of %lf is %lf\n", x, result); return 0; }
Portability
POSIX | Win32 | ANSI C | ANSI C++ | |
---|---|---|---|---|
sin |
+ |
+ |
+ |
+ |
sinl |
+ |
+ |
+ |