1sin(3)                     Library Functions Manual                     sin(3)
2
3
4

NAME

6       sin, sinf, sinl - sine function
7

LIBRARY

9       Math library (libm, -lm)
10

SYNOPSIS

12       #include <math.h>
13
14       double sin(double x);
15       float sinf(float x);
16       long double sinl(long double x);
17
18   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
19
20       sinf(), sinl():
21           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
22               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
23               || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
24

DESCRIPTION

26       These functions return the sine of x, where x is given in radians.
27

RETURN VALUE

29       On success, these functions return the sine of x.
30
31       If x is a NaN, a NaN is returned.
32
33       If  x is positive infinity or negative infinity, a domain error occurs,
34       and a NaN is returned.
35

ERRORS

37       See math_error(7) for information on how to determine whether an  error
38       has occurred when calling these functions.
39
40       The following errors can occur:
41
42       Domain error: x is an infinity
43              errno  is set to EDOM (but see BUGS).  An invalid floating-point
44              exception (FE_INVALID) is raised.
45

ATTRIBUTES

47       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
48       tributes(7).
49
50       ┌────────────────────────────────────────────┬───────────────┬─────────┐
51Interface                                   Attribute     Value   
52       ├────────────────────────────────────────────┼───────────────┼─────────┤
53sin(), sinf(), sinl()                       │ Thread safety │ MT-Safe │
54       └────────────────────────────────────────────┴───────────────┴─────────┘
55

STANDARDS

57       C11, POSIX.1-2008.
58

HISTORY

60       C99, POSIX.1-2001.
61
62       The variant returning double also conforms to SVr4, 4.3BSD, C89.
63

BUGS

65       Before  glibc  2.10, the glibc implementation did not set errno to EDOM
66       when a domain error occurred.
67

SEE ALSO

69       acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)
70
71
72
73Linux man-pages 6.04              2023-03-30                            sin(3)
Impressum