1// -*- C++ -*- compatibility header.
2
3// Copyright (C) 2002-2022 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library 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 General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file math.h
26 * This is a Standard C++ Library header.
27 */
28
29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
30# include_next <math.h>
31#else
32
33#ifndef _GLIBCXX_MATH_H
34#define _GLIBCXX_MATH_H 1
35
36# include <cmath>
37
38using std::abs;
39using std::acos;
40using std::asin;
41using std::atan;
42using std::atan2;
43using std::cos;
44using std::sin;
45using std::tan;
46using std::cosh;
47using std::sinh;
48using std::tanh;
49using std::exp;
50using std::frexp;
51using std::ldexp;
52using std::log;
53using std::log10;
54using std::modf;
55using std::pow;
56using std::sqrt;
57using std::ceil;
58using std::fabs;
59using std::floor;
60using std::fmod;
61
62#if _GLIBCXX_USE_C99_MATH
63using std::fpclassify;
64using std::isfinite;
65using std::isinf;
66using std::isnan;
67using std::isnormal;
68using std::signbit;
69using std::isgreater;
70using std::isgreaterequal;
71using std::isless;
72using std::islessequal;
73using std::islessgreater;
74using std::isunordered;
75#endif
76
77#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1)
78using std::acosh;
79using std::asinh;
80using std::atanh;
81using std::cbrt;
82using std::copysign;
83using std::erf;
84using std::erfc;
85using std::exp2;
86using std::expm1;
87using std::fdim;
88using std::fma;
89using std::fmax;
90using std::fmin;
91using std::hypot;
92using std::ilogb;
93using std::lgamma;
94using std::llrint;
95using std::llround;
96using std::log1p;
97using std::log2;
98using std::logb;
99using std::lrint;
100using std::lround;
101using std::nearbyint;
102using std::nextafter;
103using std::nexttoward;
104using std::remainder;
105using std::remquo;
106using std::rint;
107using std::round;
108using std::scalbln;
109using std::scalbn;
110using std::tgamma;
111using std::trunc;
112#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1
113
114// The mathematical special functions are only added to the global namespace
115// by IS 29124, but not by C++17.
116#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
117using std::assoc_laguerref;
118using std::assoc_laguerrel;
119using std::assoc_laguerre;
120using std::assoc_legendref;
121using std::assoc_legendrel;
122using std::assoc_legendre;
123using std::betaf;
124using std::betal;
125using std::beta;
126using std::comp_ellint_1f;
127using std::comp_ellint_1l;
128using std::comp_ellint_1;
129using std::comp_ellint_2f;
130using std::comp_ellint_2l;
131using std::comp_ellint_2;
132using std::comp_ellint_3f;
133using std::comp_ellint_3l;
134using std::comp_ellint_3;
135using std::cyl_bessel_if;
136using std::cyl_bessel_il;
137using std::cyl_bessel_i;
138using std::cyl_bessel_jf;
139using std::cyl_bessel_jl;
140using std::cyl_bessel_j;
141using std::cyl_bessel_kf;
142using std::cyl_bessel_kl;
143using std::cyl_bessel_k;
144using std::cyl_neumannf;
145using std::cyl_neumannl;
146using std::cyl_neumann;
147using std::ellint_1f;
148using std::ellint_1l;
149using std::ellint_1;
150using std::ellint_2f;
151using std::ellint_2l;
152using std::ellint_2;
153using std::ellint_3f;
154using std::ellint_3l;
155using std::ellint_3;
156using std::expintf;
157using std::expintl;
158using std::expint;
159using std::hermitef;
160using std::hermitel;
161using std::hermite;
162using std::laguerref;
163using std::laguerrel;
164using std::laguerre;
165using std::legendref;
166using std::legendrel;
167using std::legendre;
168using std::riemann_zetaf;
169using std::riemann_zetal;
170using std::riemann_zeta;
171using std::sph_besself;
172using std::sph_bessell;
173using std::sph_bessel;
174using std::sph_legendref;
175using std::sph_legendrel;
176using std::sph_legendre;
177using std::sph_neumannf;
178using std::sph_neumannl;
179using std::sph_neumann;
180#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
181
182#if __cplusplus > 201703L
183using std::lerp;
184#endif // C++20
185
186#endif // _GLIBCXX_MATH_H
187#endif // __cplusplus
188