math.h
Go to the documentation of this file.
// -*- C++ -*- compatibility header.
// Copyright (C) 2002-2023 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file math.h
* This is a Standard C++ Library header.
*/
#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
# include_next <math.h>
#else
#ifndef _GLIBCXX_MATH_H
#define _GLIBCXX_MATH_H 1
# include <cmath>
using std::abs;
using std::acos;
using std::asin;
using std::atan;
using std::atan2;
using std::cos;
using std::sin;
using std::tan;
using std::cosh;
using std::sinh;
using std::tanh;
using std::exp;
using std::frexp;
using std::ldexp;
using std::log;
using std::log10;
using std::modf;
using std::pow;
using std::sqrt;
using std::ceil;
using std::fabs;
using std::floor;
using std::fmod;
#if _GLIBCXX_USE_C99_MATH
using std::fpclassify;
using std::isfinite;
using std::isinf;
using std::isnan;
using std::isnormal;
using std::signbit;
using std::isgreater;
using std::isgreaterequal;
using std::isless;
using std::islessequal;
using std::islessgreater;
using std::isunordered;
#endif
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1)
using std::acosh;
using std::asinh;
using std::atanh;
using std::cbrt;
using std::copysign;
using std::erf;
using std::erfc;
using std::exp2;
using std::expm1;
using std::fdim;
using std::fma;
using std::fmax;
using std::fmin;
using std::hypot;
using std::ilogb;
using std::lgamma;
using std::llrint;
using std::llround;
using std::log1p;
using std::log2;
using std::logb;
using std::lrint;
using std::lround;
using std::nearbyint;
using std::nextafter;
using std::nexttoward;
using std::remainder;
using std::remquo;
using std::rint;
using std::round;
using std::scalbln;
using std::scalbn;
using std::tgamma;
using std::trunc;
#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1
// The mathematical special functions are only added to the global namespace
// by IS 29124, but not by C++17.
#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
using std::assoc_laguerref;
using std::assoc_laguerrel;
using std::assoc_laguerre;
using std::assoc_legendref;
using std::assoc_legendrel;
using std::assoc_legendre;
using std::betaf;
using std::betal;
using std::beta;
using std::comp_ellint_1f;
using std::comp_ellint_1l;
using std::comp_ellint_1;
using std::comp_ellint_2f;
using std::comp_ellint_2l;
using std::comp_ellint_2;
using std::comp_ellint_3f;
using std::comp_ellint_3l;
using std::comp_ellint_3;
using std::cyl_bessel_if;
using std::cyl_bessel_il;
using std::cyl_bessel_i;
using std::cyl_bessel_jf;
using std::cyl_bessel_jl;
using std::cyl_bessel_j;
using std::cyl_bessel_kf;
using std::cyl_bessel_kl;
using std::cyl_bessel_k;
using std::cyl_neumannf;
using std::cyl_neumannl;
using std::cyl_neumann;
using std::ellint_1f;
using std::ellint_1l;
using std::ellint_1;
using std::ellint_2f;
using std::ellint_2l;
using std::ellint_2;
using std::ellint_3f;
using std::ellint_3l;
using std::ellint_3;
using std::expintf;
using std::expintl;
using std::expint;
using std::hermitef;
using std::hermitel;
using std::hermite;
using std::laguerref;
using std::laguerrel;
using std::laguerre;
using std::legendref;
using std::legendrel;
using std::legendre;
using std::riemann_zetaf;
using std::riemann_zetal;
using std::riemann_zeta;
using std::sph_besself;
using std::sph_bessell;
using std::sph_bessel;
using std::sph_legendref;
using std::sph_legendrel;
using std::sph_legendre;
using std::sph_neumannf;
using std::sph_neumannl;
using std::sph_neumann;
#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
#if __cplusplus > 201703L
using std::lerp;
#endif // C++20
#endif // _GLIBCXX_MATH_H
#endif // __cplusplus
std::log10
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
Definition complex:1090
std::sin
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
Definition complex:1120
std::log
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
Definition complex:1085
std::tan
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
Definition complex:1221
std::abs
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:891
std::exp
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
Definition complex:1058
std::cosh
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
Definition complex:1032
std::tanh
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
Definition complex:1249
std::pow
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
Definition complex:1280
std::sinh
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
Definition complex:1150
std::cos
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
Definition complex:1002
std::sqrt
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
Definition complex:1194
std::sph_bessel
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1100
std::sph_bessell
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1081
std::betaf
float betaf(float __a, float __b)
Definition specfun.h:310
std::expintl
long double expintl(long double __x)
Definition specfun.h:852
std::cyl_bessel_jf
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:548
std::cyl_bessel_k
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:631
std::ellint_3f
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:790
std::legendrel
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:985
std::comp_ellint_3l
long double comp_ellint_3l(long double __k, long double __nu)
Return the complete elliptic integral of the third kind for long double modulus k.
Definition specfun.h:461
std::riemann_zetal
long double riemann_zetal(long double __s)
Definition specfun.h:1030
std::cyl_bessel_kf
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:594
std::comp_ellint_2f
float comp_ellint_2f(float __k)
Definition specfun.h:404
std::hermitel
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:893
std::ellint_1
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:727
std::sph_legendrel
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1126
std::ellint_1f
float ellint_1f(float __k, float __phi)
Definition specfun.h:694
std::cyl_neumann
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:679
std::assoc_legendref
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:265
std::sph_neumannl
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1172
std::comp_ellint_2l
long double comp_ellint_2l(long double __k)
Definition specfun.h:414
std::comp_ellint_2
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:436
std::sph_besself
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1071
std::assoc_legendrel
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:274
std::legendre
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1005
std::expintf
float expintf(float __x)
Definition specfun.h:842
std::ellint_2f
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:742
std::ellint_3
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:828
std::ellint_2l
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:752
std::cyl_neumannf
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:646
std::beta
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:341
std::comp_ellint_1l
long double comp_ellint_1l(long double __k)
Definition specfun.h:366
std::comp_ellint_3f
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:451
std::sph_neumannf
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1162
std::expint
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:868
std::ellint_1l
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:704
std::comp_ellint_1f
float comp_ellint_1f(float __k)
Definition specfun.h:356
std::betal
long double betal(long double __a, long double __b)
Definition specfun.h:320
std::hermitef
float hermitef(unsigned int __n, float __x)
Definition specfun.h:883
std::riemann_zeta
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1056
std::ellint_3l
long double ellint_3l(long double __k, long double __nu, long double __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:800
std::sph_legendref
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1115
std::sph_neumann
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1191
std::cyl_bessel_if
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:502
std::laguerrel
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:941
std::cyl_bessel_il
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:512
std::assoc_laguerre
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:250
std::comp_ellint_3
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:487
std::sph_legendre
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1147
std::cyl_bessel_kl
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:604
std::assoc_laguerrel
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:214
std::hermite
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:916
std::cyl_bessel_j
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:579
std::laguerref
float laguerref(unsigned int __n, float __x)
Definition specfun.h:931
std::cyl_bessel_jl
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:558
std::comp_ellint_1
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:389
std::ellint_2
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:775
std::laguerre
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:960
std::legendref
float legendref(unsigned int __l, float __x)
Definition specfun.h:975
std::cyl_bessel_i
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:533
std::assoc_legendre
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:296
std::assoc_laguerref
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:204
std::cyl_neumannl
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:656
std::riemann_zetaf
float riemann_zetaf(float __s)
Definition specfun.h:1020
std::auto_ptr_ref
Definition auto_ptr.h:49
cmath