Blame math/bits/cmathcalls.h

Packit 6c4009
/* Prototype declarations for complex math functions;
Packit 6c4009
   helper file for <complex.h>.
Packit 6c4009
   Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library 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 GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
/* NOTE: Because of the special way this file is used by <complex.h>, this
Packit 6c4009
   file must NOT be protected from multiple inclusion as header files
Packit 6c4009
   usually are.
Packit 6c4009
Packit 6c4009
   This file provides prototype declarations for the math functions.
Packit 6c4009
   Most functions are declared using the macro:
Packit 6c4009
Packit 6c4009
   __MATHCALL (NAME, (ARGS...));
Packit 6c4009
Packit 6c4009
   This means there is a function `NAME' returning `double' and a function
Packit 6c4009
   `NAMEf' returning `float'.  Each place `_Mdouble_' appears in the
Packit 6c4009
   prototype, that is actually `double' in the prototype for `NAME' and
Packit 6c4009
   `float' in the prototype for `NAMEf'.  Reentrant variant functions are
Packit 6c4009
   called `NAME_r' and `NAMEf_r'.
Packit 6c4009
Packit 6c4009
   Functions returning other types like `int' are declared using the macro:
Packit 6c4009
Packit 6c4009
   __MATHDECL (TYPE, NAME, (ARGS...));
Packit 6c4009
Packit 6c4009
   This is just like __MATHCALL but for a function returning `TYPE'
Packit 6c4009
   instead of `_Mdouble_'.  In all of these cases, there is still
Packit 6c4009
   both a `NAME' and a `NAMEf' that takes `float' arguments.  */
Packit 6c4009
Packit 6c4009
#ifndef _COMPLEX_H
Packit 6c4009
#error "Never use <bits/cmathcalls.h> directly; include <complex.h> instead."
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifndef _Mdouble_complex_
Packit 6c4009
# define _Mdouble_complex_ _Mdouble_ _Complex
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Trigonometric functions.  */
Packit 6c4009
Packit 6c4009
/* Arc cosine of Z.  */
Packit 6c4009
__MATHCALL (cacos, (_Mdouble_complex_ __z));
Packit 6c4009
/* Arc sine of Z.  */
Packit 6c4009
__MATHCALL (casin, (_Mdouble_complex_ __z));
Packit 6c4009
/* Arc tangent of Z.  */
Packit 6c4009
__MATHCALL (catan, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Cosine of Z.  */
Packit 6c4009
__MATHCALL (ccos, (_Mdouble_complex_ __z));
Packit 6c4009
/* Sine of Z.  */
Packit 6c4009
__MATHCALL (csin, (_Mdouble_complex_ __z));
Packit 6c4009
/* Tangent of Z.  */
Packit 6c4009
__MATHCALL (ctan, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Hyperbolic functions.  */
Packit 6c4009
Packit 6c4009
/* Hyperbolic arc cosine of Z.  */
Packit 6c4009
__MATHCALL (cacosh, (_Mdouble_complex_ __z));
Packit 6c4009
/* Hyperbolic arc sine of Z.  */
Packit 6c4009
__MATHCALL (casinh, (_Mdouble_complex_ __z));
Packit 6c4009
/* Hyperbolic arc tangent of Z.  */
Packit 6c4009
__MATHCALL (catanh, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Hyperbolic cosine of Z.  */
Packit 6c4009
__MATHCALL (ccosh, (_Mdouble_complex_ __z));
Packit 6c4009
/* Hyperbolic sine of Z.  */
Packit 6c4009
__MATHCALL (csinh, (_Mdouble_complex_ __z));
Packit 6c4009
/* Hyperbolic tangent of Z.  */
Packit 6c4009
__MATHCALL (ctanh, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Exponential and logarithmic functions.  */
Packit 6c4009
Packit 6c4009
/* Exponential function of Z.  */
Packit 6c4009
__MATHCALL (cexp, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Natural logarithm of Z.  */
Packit 6c4009
__MATHCALL (clog, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* The base 10 logarithm is not defined by the standard but to implement
Packit 6c4009
   the standard C++ library it is handy.  */
Packit 6c4009
__MATHCALL (clog10, (_Mdouble_complex_ __z));
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Power functions.  */
Packit 6c4009
Packit 6c4009
/* Return X to the Y power.  */
Packit 6c4009
__MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y));
Packit 6c4009
Packit 6c4009
/* Return the square root of Z.  */
Packit 6c4009
__MATHCALL (csqrt, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Absolute value, conjugates, and projection.  */
Packit 6c4009
Packit 6c4009
/* Absolute value of Z.  */
Packit 6c4009
__MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Argument value of Z.  */
Packit 6c4009
__MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Complex conjugate of Z.  */
Packit 6c4009
__MATHCALL (conj, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Projection of Z onto the Riemann sphere.  */
Packit 6c4009
__MATHCALL (cproj, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Decomposing complex values.  */
Packit 6c4009
Packit 6c4009
/* Imaginary part of Z.  */
Packit 6c4009
__MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z));
Packit 6c4009
Packit 6c4009
/* Real part of Z.  */
Packit 6c4009
__MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z));