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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       asin, asinf, asinl - arc sine function
13

SYNOPSIS

15       #include <math.h>
16
17       double asin(double x);
18       float asinf(float x);
19       long double asinl(long double x);
20
21

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

76       None.
77

APPLICATION USAGE

79       On  error,  the  expressions  (math_errhandling   &   MATH_ERRNO)   and
80       (math_errhandling  & MATH_ERREXCEPT) are independent of each other, but
81       at least one of them must be non-zero.
82

RATIONALE

84       None.
85

FUTURE DIRECTIONS

87       None.
88

SEE ALSO

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