2 /* @(#)w_asin.c 5.1 93/09/24 */
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7 * Developed at SunPro, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
11 * ====================================================
17 <<asin>>, <<asinf>>---arc sine
26 double asin(double <[x]>);
27 float asinf(float <[x]>);
40 <<asin>> computes the inverse sine (arc sine) of the argument <[x]>.
41 Arguments to <<asin>> must be in the range @minus{}1 to 1.
43 <<asinf>> is identical to <<asin>>, other than taking and
46 You can modify error handling for these routines using <<matherr>>.
50 <<asin>> returns values in radians, in the range of -pi/2 to pi/2.
53 <<asin>> returns values in radians, in the range of $-\pi/2$ to $\pi/2$.
56 If <[x]> is not in the range @minus{}1 to 1, <<asin>> and <<asinf>>
57 return NaN (not a number), set the global variable <<errno>> to
58 <<EDOM>>, and issue a <<DOMAIN error>> message.
60 You can change this error treatment using <<matherr>>.
62 QUICKREF ANSI SVID POSIX RENTRANT
67 asin, -1<=arg<=1, asin(arg),,,
68 asin, NAN, arg,EDOM, DOMAIN
71 asinf, -1<=arg<=1, asin(arg),,,
72 asinf, NAN, arg,EDOM, DOMAIN
85 #ifndef _DOUBLE_IS_32BITS
88 double asin(double x
) /* wrapper asin */
90 double asin(x
) /* wrapper asin */
95 return __ieee754_asin(x
);
99 z
= __ieee754_asin(x
);
100 if(_LIB_VERSION
== _IEEE_
|| isnan(x
)) return z
;
106 exc
.arg1
= exc
.arg2
= x
;
108 if(_LIB_VERSION
== _POSIX_
)
110 else if (!matherr(&exc
)) {
121 #endif /* defined(_DOUBLE_IS_32BITS) */