1ASIN(P)                    POSIX Programmer's Manual                   ASIN(P)
2
3
4

NAME

6       asin, asinf, asinl - arc sine function
7

SYNOPSIS

9       #include <math.h>
10
11       double asin(double x);
12       float asinf(float x);
13       long double asinl(long double x);
14
15

DESCRIPTION

17       These  functions  shall  compute the principal value of the arc sine of
18       their argument x. The value of x should be in the range [-1,1].
19
20       An application wishing to check for error situations should  set  errno
21       to  zero  and  call  feclearexcept(FE_ALL_EXCEPT)  before calling these
22       functions.  On return, if errno is non-zero or  fetestexcept(FE_INVALID
23       |  FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has
24       occurred.
25

RETURN VALUE

27       Upon successful completion, these functions shall return the  arc  sine
28       of x, in the range [-pi/2,pi/2] radians.
29
30       For  finite  values  of x not in the range [-1,1], a domain error shall
31       occur, and    either a NaN  (if  supported),  or    an  implementation-
32       defined value shall be returned.
33
34       If x is NaN, a NaN shall be returned.
35
36       If x is ±0, x shall be returned.
37
38       If  x  is  ±Inf,  a domain error shall occur, and either a NaN (if sup‐
39       ported), or an implementation-defined value shall be returned.
40
41       If x is subnormal, a range error may occur and x should be returned.
42

ERRORS

44       These functions shall fail if:
45
46       Domain Error
47              The x argument is finite and is not in the range  [-1,1],     or
48              is ±Inf.
49
50       If  the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
51       then  errno  shall  be  set  to  [EDOM].  If  the  integer   expression
52       (math_errhandling  &  MATH_ERREXCEPT)  is  non-zero,  then  the invalid
53       floating-point exception shall be raised.
54
55
56       These functions may fail if:
57
58       Range Error
59              The value of x is subnormal.
60
61       If the integer expression (math_errhandling & MATH_ERRNO) is  non-zero,
62       then  errno  shall  be  set  to  [ERANGE].  If  the  integer expression
63       (math_errhandling & MATH_ERREXCEPT) is  non-zero,  then  the  underflow
64       floating-point exception shall be raised.
65
66
67       The following sections are informative.
68

EXAMPLES

70       None.
71

APPLICATION USAGE

73       On   error,   the   expressions  (math_errhandling  &  MATH_ERRNO)  and
74       (math_errhandling & MATH_ERREXCEPT) are independent of each other,  but
75       at least one of them must be non-zero.
76

RATIONALE

78       None.
79

FUTURE DIRECTIONS

81       None.
82

SEE ALSO

84       feclearexcept()  ,  fetestexcept() , isnan() , sin() , the Base Defini‐
85       tions volume of IEEE Std 1003.1-2001, Section 4.18, Treatment of  Error
86       Conditions for Mathematical Functions, <math.h>
87
89       Portions  of  this text are reprinted and reproduced in electronic form
90       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
91       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
92       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
93       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
94       event of any discrepancy between this version and the original IEEE and
95       The  Open Group Standard, the original IEEE and The Open Group Standard
96       is the referee document. The original Standard can be  obtained  online
97       at http://www.opengroup.org/unix/online.html .
98
99
100
101IEEE/The Open Group                  2003                              ASIN(P)
Impressum