1SIN(3) Linux Programmer's Manual SIN(3)
2
3
4
6 sin, sinf, sinl - sine function
7
9 #include <math.h>
10
11 double sin(double x);
12 float sinf(float x);
13 long double sinl(long double x);
14
15 Link with -lm.
16
17 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19 sinf(), sinl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
20 _ISOC99_SOURCE; or cc -std=c99
21
23 The sin() function returns the sine of x, where x is given in radians.
24
26 On success, these functions return the sine of x.
27
28 If x is a NaN, a NaN is returned.
29
30 If x is positive infinity or negative infinity, a domain error occurs,
31 and a NaN is returned.
32
34 See math_error(7) for information on how to determine whether an error
35 has occurred when calling these functions.
36
37 The following errors can occur:
38
39 Domain error: x is an infinity
40 An invalid floating-point exception (FE_INVALID) is raised.
41
42 These functions do not set errno.
43
45 C99, POSIX.1-2001. The variant returning double also conforms to SVr4,
46 4.3BSD, C89.
47
49 acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)
50
52 This page is part of release 3.25 of the Linux man-pages project. A
53 description of the project, and information about reporting bugs, can
54 be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58 2009-02-04 SIN(3)