1asin(3M) Mathematical Library Functions asin(3M)
2
3
4
6 asin, asinf, asinl - arc sine function
7
9 c99 [ flag... ] file... -lm [ library... ]
10 #include <math.h>
11
12 double asin(double x);
13
14
15 float asinf(float x);
16
17
18 long double asinl(long double x);
19
20
22 These functions compute the principal value of the arc sine of their
23 argument x. The value of x should be in the range [−1,1].
24
26 Upon successful completion, these functions return the arc sine of x in
27 the range [−pi/2, pi/2] radians.
28
29
30 For finite values of x not in the range [−1,1], a domain error occurs
31 and a NaN is returned.
32
33
34 If x is NaN, NaN is returned.
35
36
37 If x is ±0, x is returned.
38
39
40 If x is ±Inf, a domain error occurs and a NaN is returned.
41
42
43 For exceptional cases, matherr(3M) tabulates the values to be returned
44 by asin() as specified by SVID3 and XPG3.
45
47 These functions will fail if:
48
49 Domain Error The x argument is finite and not in the range [−1,1],
50 or is ±Inf.
51
52 If the integer expression (math_errhandling &
53 MATH_ERREXCEPT) is non-zero, the invalid floating-point
54 exception is raised.
55
56 The asin() function sets errno to EDOM if x is not ±Inf
57 or NaN and is not in the range [−1,1].
58
59
61 An application wanting to check for exceptions should call feclearex‐
62 cept(FE_ALL_EXCEPT) before calling these functions. On return, if
63 fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is
64 non-zero, an exception has been raised. An application should either
65 examine the return value or check the floating point exception flags to
66 detect exceptions.
67
68
69 An application can also set errno to 0 before calling asin(). On
70 return, if errno is non-zero, an error has occurred. The asinf() and
71 asinl() functions do not set errno.
72
74 See attributes(5) for descriptions of the following attributes:
75
76
77
78
79 ┌─────────────────────────────┬─────────────────────────────┐
80 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │Interface Stability │Standard │
83 ├─────────────────────────────┼─────────────────────────────┤
84 │MT-Level │MT-Safe │
85 └─────────────────────────────┴─────────────────────────────┘
86
88 isnan(3M), feclearexcept(3M), fetestexcept(3M), math.h(3HEAD), math‐
89 err(3M), sin(3M), attributes(5), standards(5)
90
91
92
93SunOS 5.11 12 Jul 2006 asin(3M)