Blame sysdeps/ieee754/dbl-64/MathLib.h

Packit 6c4009
/*
Packit 6c4009
 * IBM Accurate Mathematical Library
Packit 6c4009
 * Written by International Business Machines Corp.
Packit 6c4009
 * Copyright (C) 2001-2018 Free Software Foundation, Inc.
Packit 6c4009
 *
Packit 6c4009
 * This program is free software; you can redistribute it and/or modify
Packit 6c4009
 * it under the terms of the GNU Lesser General Public License as published by
Packit 6c4009
 * the Free Software Foundation; either version 2.1 of the License, or
Packit 6c4009
 * (at your option) any later version.
Packit 6c4009
 *
Packit 6c4009
 * This program is distributed in the hope that it will be useful,
Packit 6c4009
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 6c4009
 * GNU Lesser General Public License for more details.
Packit 6c4009
 *
Packit 6c4009
 * You should have received a copy of the GNU Lesser General Public License
Packit 6c4009
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
/********************************************************************/
Packit 6c4009
/* Ultimate math functions. Each function computes the exact        */
Packit 6c4009
/* theoretical value of its argument rounded to nearest or even.    */
Packit 6c4009
/*                                                                  */
Packit 6c4009
/* Assumption: Machine arithmetic operations are performed in       */
Packit 6c4009
/* round nearest mode of IEEE 754 standard.                         */
Packit 6c4009
/********************************************************************/
Packit 6c4009
Packit 6c4009
#ifndef UMATH_LIB
Packit 6c4009
#define UMATH_LIB
Packit 6c4009
/********************************************************************/
Packit 6c4009
/* Function changes the precision mode to IEEE 754 double precision */
Packit 6c4009
/* and the rounding mode to nearest or even.                        */
Packit 6c4009
/* It returns the original status of these modes.                   */
Packit 6c4009
/* See further explanations of usage in DPChange.h                  */
Packit 6c4009
/********************************************************************/
Packit 6c4009
unsigned short Init_Lib (void);
Packit 6c4009
Packit 6c4009
/********************************************************************/
Packit 6c4009
/* Function that changes the precision and rounding modes to the    */
Packit 6c4009
/* specified by the argument received. See further explanations in  */
Packit 6c4009
/* DPChange.h                                                       */
Packit 6c4009
/********************************************************************/
Packit 6c4009
void Exit_Lib (unsigned short);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* The  asin() function calculates the arc sine of its argument.    */
Packit 6c4009
/* The  function returns the arc sine in radians                    */
Packit 6c4009
/* (between -PI/2 and PI/2).                                        */
Packit 6c4009
/* If the argument is greater than 1 or less than -1 it returns     */
Packit 6c4009
/* a NaN.                                                           */
Packit 6c4009
double uasin (double);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* The  acos() function calculates the arc cosine of its argument.  */
Packit 6c4009
/* The  function returns the arc cosine in radians                  */
Packit 6c4009
/* (between -PI/2 and PI/2).                                        */
Packit 6c4009
/* If the argument is greater than 1 or less than -1 it returns     */
Packit 6c4009
/* a NaN.                                                           */
Packit 6c4009
double uacos (double);
Packit 6c4009
Packit 6c4009
/* The  atan() function calculates the arctanget of its argument.   */
Packit 6c4009
/* The  function returns the arc tangent in radians                 */
Packit 6c4009
/* (between -PI/2 and PI/2).                                        */
Packit 6c4009
double uatan (double);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* The uatan2() function calculates the arc tangent of the two arguments x   */
Packit 6c4009
/* and y (x is the right argument and y is the left one).The signs of both   */
Packit 6c4009
/* arguments are used to determine the quadrant of the result.               */
Packit 6c4009
/* The function returns the result in radians, which is between -PI and PI   */
Packit 6c4009
double uatan2 (double, double);
Packit 6c4009
Packit 6c4009
/* Compute log(x). The base of log is e (natural logarithm)         */
Packit 6c4009
double ulog (double);
Packit 6c4009
Packit 6c4009
/* Compute e raised to the power of argument x.                     */
Packit 6c4009
double uexp (double);
Packit 6c4009
Packit 6c4009
/* Compute sin(x). The argument x is assumed to be given in radians.*/
Packit 6c4009
double usin (double);
Packit 6c4009
Packit 6c4009
/* Compute cos(x). The argument x is assumed to be given in radians.*/
Packit 6c4009
double ucos (double);
Packit 6c4009
Packit 6c4009
/* Compute tan(x). The argument x is assumed to be given in radians.*/
Packit 6c4009
double utan (double);
Packit 6c4009
Packit 6c4009
/* Compute the square root of non-negative argument x.              */
Packit 6c4009
/* If x is negative the returned value is NaN.                      */
Packit 6c4009
double usqrt (double);
Packit 6c4009
Packit 6c4009
/* Compute x raised to the power of y, where x is the left argument */
Packit 6c4009
/* and y is the right argument. The function returns a NaN if x<0.  */
Packit 6c4009
/* If x equals zero it returns -inf                                 */
Packit 6c4009
double upow (double, double);
Packit 6c4009
Packit 6c4009
/* Computing x mod y, where x is the left argument and y is the     */
Packit 6c4009
/* right one.                                                       */
Packit 6c4009
double uremainder (double, double);
Packit 6c4009
#endif