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():
20 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
21 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
22 or cc -std=c99
23
25 The sin() function returns the sine of x, where x is given in radians.
26
28 On success, these functions return the sine of x.
29
30 If x is a NaN, a NaN is returned.
31
32 If x is positive infinity or negative infinity, a domain error occurs,
33 and a NaN is returned.
34
36 See math_error(7) for information on how to determine whether an error
37 has occurred when calling these functions.
38
39 The following errors can occur:
40
41 Domain error: x is an infinity
42 errno is set to EDOM (but see BUGS). An invalid floating-point
43 exception (FE_INVALID) is raised.
44
46 C99, POSIX.1-2001. The variant returning double also conforms to SVr4,
47 4.3BSD, C89.
48
50 Before version 2.10, the glibc implementation did not set errno to EDOM
51 when a domain error occurred.
52
54 acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)
55
57 This page is part of release 3.53 of the Linux man-pages project. A
58 description of the project, and information about reporting bugs, can
59 be found at http://www.kernel.org/doc/man-pages/.
60
61
62
63 2010-09-11 SIN(3)