Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / mathfp / s_acos.c
blobd43b45c6c34d43250cb2b028c05694d42a2c7567
2 /* @(#)z_acos.c 1.0 98/08/13 */
4 /*
5 FUNCTION
6 <<acos>>, <<acosf>>---arc cosine
8 INDEX
9 acos
10 INDEX
11 acosf
13 SYNOPSIS
14 #include <math.h>
15 double acos(double <[x]>);
16 float acosf(float <[x]>);
18 DESCRIPTION
20 <<acos>> computes the inverse cosine (arc cosine) of the input value.
21 Arguments to <<acos>> must be in the range @minus{}1 to 1.
23 <<acosf>> is identical to <<acos>>, except that it performs
24 its calculations on <<floats>>.
26 RETURNS
27 @ifnottex
28 <<acos>> and <<acosf>> return values in radians, in the range of 0 to pi
30 @end ifnottex
31 @tex
32 <<acos>> and <<acosf>> return values in radians, in the range of <<0>> t
33 o $\pi$.
34 @end tex
36 If <[x]> is not between @minus{}1 and 1, the returned value is NaN
37 (not a number) the global variable <<errno>> is set to <<EDOM>>, and a
38 <<DOMAIN error>> message is sent as standard error output.
40 QUICKREF
41 ansi posix rentrant
42 acos y,y,m
43 acosf n,n,m
45 MATHREF
46 acos, [-1,1], acos(arg),,,
47 acos, NAN, arg,DOMAIN,EDOM
49 MATHREF
50 acosf, [-1,1], acosf(arg),,,
51 acosf, NAN, argf,DOMAIN,EDOM
55 /*****************************************************************
56 * Arccosine
58 * Input:
59 * x - floating point value
61 * Output:
62 * arccosine of x
64 * Description:
65 * This routine returns the arccosine of x.
67 *****************************************************************/
69 #include "fdlibm.h"
70 #include "zmath.h"
72 #ifndef _DOUBLE_IS_32BITS
74 double
75 acos (double x)
77 return (asine (x, 1));
80 #endif /* _DOUBLE_IS_32BITS */