OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libm/] [mathfp/] [s_acos.c] - Blame information for rev 262

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
 
2
/* @(#)z_acos.c 1.0 98/08/13 */
3
 
4
/*
5
FUNCTION
6
        <<acos>>, <<acosf>>---arc cosine
7
 
8
INDEX
9
        acos
10
INDEX
11
        acosf
12
 
13
ANSI_SYNOPSIS
14
        #include <math.h>
15
        double acos(double <[x]>);
16
        float acosf(float <[x]>);
17
 
18
TRAD_SYNOPSIS
19
        #include <math.h>
20
        double acos(<[x]>)
21
        double <[x]>;
22
 
23
        float acosf(<[x]>)
24
        float <[x]>;
25
 
26
 
27
 
28
DESCRIPTION
29
 
30
        <<acos>> computes the inverse cosine (arc cosine) of the input value.
31
        Arguments to <<acos>> must be in the range @minus{}1 to 1.
32
 
33
        <<acosf>> is identical to <<acos>>, except that it performs
34
        its calculations on <<floats>>.
35
 
36
RETURNS
37
        @ifnottex
38
        <<acos>> and <<acosf>> return values in radians, in the range of 0 to pi
39
.
40
        @end ifnottex
41
        @tex
42
        <<acos>> and <<acosf>> return values in radians, in the range of <<0>> t
43
o $\pi$.
44
        @end tex
45
 
46
        If <[x]> is not between @minus{}1 and 1, the returned value is NaN
47
        (not a number) the global variable <<errno>> is set to <<EDOM>>, and a
48
        <<DOMAIN error>> message is sent as standard error output.
49
 
50
        You can modify error handling for these functions using <<matherr>>.
51
 
52
 
53
QUICKREF ANSI SVID POSIX RENTRANT
54
 acos    y,y,y,m
55
 acosf   n,n,n,m
56
 
57
MATHREF
58
 acos, [-1,1], acos(arg),,,
59
 acos, NAN,    arg,DOMAIN,EDOM
60
 
61
MATHREF
62
 acosf, [-1,1], acosf(arg),,,
63
 acosf, NAN,    argf,DOMAIN,EDOM
64
 
65
*/
66
 
67
/*****************************************************************
68
 * Arccosine
69
 *
70
 * Input:
71
 *   x - floating point value
72
 *
73
 * Output:
74
 *   arccosine of x
75
 *
76
 * Description:
77
 *   This routine returns the arccosine of x.
78
 *
79
 *****************************************************************/
80
 
81
#include "fdlibm.h"
82
#include "zmath.h"
83
 
84
#ifndef _DOUBLE_IS_32BITS
85
 
86
double
87
_DEFUN (acos, (double),
88
        double x)
89
{
90
  return (asine (x, 1));
91
}
92
 
93
#endif /* _DOUBLE_IS_32BITS */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.