source: trunk/libs/newlib/src/newlib/libm/mathfp/s_acos.c @ 471

Last change on this file since 471 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.7 KB
Line 
1
2/* @(#)z_acos.c 1.0 98/08/13 */
3
4/*
5FUNCTION
6        <<acos>>, <<acosf>>---arc cosine
7
8INDEX
9        acos
10INDEX
11        acosf
12
13SYNOPSIS
14        #include <math.h>
15        double acos(double <[x]>);
16        float acosf(float <[x]>);
17
18DESCRIPTION
19
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.
22
23        <<acosf>> is identical to <<acos>>, except that it performs
24        its calculations on <<floats>>.
25
26RETURNS
27        @ifnottex
28        <<acos>> and <<acosf>> return values in radians, in the range of 0 to pi
29.
30        @end ifnottex
31        @tex
32        <<acos>> and <<acosf>> return values in radians, in the range of <<0>> t
33o $\pi$.
34        @end tex
35
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.
39
40        You can modify error handling for these functions using <<matherr>>.
41
42
43QUICKREF
44 ansi svid posix rentrant
45 acos    y,y,y,m
46 acosf   n,n,n,m
47
48MATHREF
49 acos, [-1,1], acos(arg),,,
50 acos, NAN,    arg,DOMAIN,EDOM
51
52MATHREF
53 acosf, [-1,1], acosf(arg),,,
54 acosf, NAN,    argf,DOMAIN,EDOM
55
56*/
57
58/*****************************************************************
59 * Arccosine
60 *
61 * Input:
62 *   x - floating point value
63 *
64 * Output:
65 *   arccosine of x
66 *
67 * Description:
68 *   This routine returns the arccosine of x.
69 *
70 *****************************************************************/
71
72#include "fdlibm.h"
73#include "zmath.h"
74
75#ifndef _DOUBLE_IS_32BITS
76
77double
78acos (double x)
79{
80  return (asine (x, 1));
81}
82
83#endif /* _DOUBLE_IS_32BITS */
Note: See TracBrowser for help on using the repository browser.