chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / sysdeps / ieee754 / dbl-64 / MathLib.h
1 /*
2  * IBM Accurate Mathematical Library
3  * Written by International Business Machines Corp.
4  * Copyright (C) 2001 Free Software Foundation, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 /********************************************************************/
22 /* Ultimate math functions. Each function computes the exact        */
23 /* theoretical value of its argument rounded to nearest or even.    */
24 /*                                                                  */
25 /* Assumption: Machine arithmetic operations are performed in       */
26 /* round nearest mode of IEEE 754 standard.                         */
27 /********************************************************************/
28
29 #ifndef UMATH_LIB
30 #define UMATH_LIB
31 /********************************************************************/
32 /* Function changes the precision mode to IEEE 754 double precision */
33 /* and the rounding mode to nearest or even.                        */
34 /* It returns the original status of these modes.                   */
35 /* See further explanations of usage in DPChange.h                  */
36 /********************************************************************/
37 unsigned short Init_Lib(void);
38
39 /********************************************************************/
40 /* Function that changes the precision and rounding modes to the    */
41 /* specified by the argument received. See further explanations in  */
42 /* DPChange.h                                                       */
43 /********************************************************************/
44 void Exit_Lib(unsigned short);
45
46
47 /* The  asin() function calculates the arc sine of its argument.    */
48 /* The  function returns the arc sine in radians                    */
49 /* (between -PI/2 and PI/2).                                        */
50 /* If the argument is greater than 1 or less than -1 it returns     */
51 /* a NaN.                                                           */
52 double uasin(double );
53
54
55 /* The  acos() function calculates the arc cosine of its argument.  */
56 /* The  function returns the arc cosine in radians                  */
57 /* (between -PI/2 and PI/2).                                        */
58 /* If the argument is greater than 1 or less than -1 it returns     */
59 /* a NaN.                                                           */
60 double uacos(double );
61
62 /* The  atan() function calculates the arctanget of its argument.   */
63 /* The  function returns the arc tangent in radians                 */
64 /* (between -PI/2 and PI/2).                                        */
65 double uatan(double );
66
67
68 /* The uatan2() function calculates the arc tangent of the two arguments x   */
69 /* and y (x is the right argument and y is the left one).The signs of both   */
70 /* arguments are used to determine the quadrant of the result.               */
71 /* The function returns the result in radians, which is between -PI and PI   */
72 double uatan2(double ,double );
73
74 /* Compute log(x). The base of log is e (natural logarithm)         */
75 double ulog(double );
76
77 /* Compute e raised to the power of argument x.                     */
78 double uexp(double );
79
80 /* Compute sin(x). The argument x is assumed to be given in radians.*/
81 double usin(double );
82
83 /* Compute cos(x). The argument x is assumed to be given in radians.*/
84 double ucos(double );
85
86 /* Compute tan(x). The argument x is assumed to be given in radians.*/
87 double utan(double );
88
89 /* Compute the square root of non-negative argument x.              */
90 /* If x is negative the returned value is NaN.                      */
91 double usqrt(double );
92
93 /* Compute x raised to the power of y, where x is the left argument */
94 /* and y is the right argument. The function returns a NaN if x<0.  */
95 /* If x equals zero it returns -inf                                 */
96 double upow(double , double );
97
98 /* Computing x mod y, where x is the left argument and y is the     */
99 /* right one.                                                       */
100 double uremainder(double , double );
101
102
103 #endif