xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/c_compatibility/math.h (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
136ac495dSmrg // -*- C++ -*- compatibility header.
236ac495dSmrg 
3*8feb0f0bSmrg // Copyright (C) 2002-2020 Free Software Foundation, Inc.
436ac495dSmrg //
536ac495dSmrg // This file is part of the GNU ISO C++ Library.  This library is free
636ac495dSmrg // software; you can redistribute it and/or modify it under the
736ac495dSmrg // terms of the GNU General Public License as published by the
836ac495dSmrg // Free Software Foundation; either version 3, or (at your option)
936ac495dSmrg // any later version.
1036ac495dSmrg 
1136ac495dSmrg // This library is distributed in the hope that it will be useful,
1236ac495dSmrg // but WITHOUT ANY WARRANTY; without even the implied warranty of
1336ac495dSmrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1436ac495dSmrg // GNU General Public License for more details.
1536ac495dSmrg 
1636ac495dSmrg // Under Section 7 of GPL version 3, you are granted additional
1736ac495dSmrg // permissions described in the GCC Runtime Library Exception, version
1836ac495dSmrg // 3.1, as published by the Free Software Foundation.
1936ac495dSmrg 
2036ac495dSmrg // You should have received a copy of the GNU General Public License and
2136ac495dSmrg // a copy of the GCC Runtime Library Exception along with this program;
2236ac495dSmrg // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
2336ac495dSmrg // <http://www.gnu.org/licenses/>.
2436ac495dSmrg 
2536ac495dSmrg /** @file math.h
2636ac495dSmrg  *  This is a Standard C++ Library header.
2736ac495dSmrg  */
2836ac495dSmrg 
2936ac495dSmrg #if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
3036ac495dSmrg # include_next <math.h>
3136ac495dSmrg #else
3236ac495dSmrg 
3336ac495dSmrg #ifndef _GLIBCXX_MATH_H
3436ac495dSmrg #define _GLIBCXX_MATH_H 1
3536ac495dSmrg 
3636ac495dSmrg # include <cmath>
3736ac495dSmrg 
3836ac495dSmrg using std::abs;
3936ac495dSmrg using std::acos;
4036ac495dSmrg using std::asin;
4136ac495dSmrg using std::atan;
4236ac495dSmrg using std::atan2;
4336ac495dSmrg using std::cos;
4436ac495dSmrg using std::sin;
4536ac495dSmrg using std::tan;
4636ac495dSmrg using std::cosh;
4736ac495dSmrg using std::sinh;
4836ac495dSmrg using std::tanh;
4936ac495dSmrg using std::exp;
5036ac495dSmrg using std::frexp;
5136ac495dSmrg using std::ldexp;
5236ac495dSmrg using std::log;
5336ac495dSmrg using std::log10;
5436ac495dSmrg using std::modf;
5536ac495dSmrg using std::pow;
5636ac495dSmrg using std::sqrt;
5736ac495dSmrg using std::ceil;
5836ac495dSmrg using std::fabs;
5936ac495dSmrg using std::floor;
6036ac495dSmrg using std::fmod;
6136ac495dSmrg 
6236ac495dSmrg #if _GLIBCXX_USE_C99_MATH
6336ac495dSmrg using std::fpclassify;
6436ac495dSmrg using std::isfinite;
6536ac495dSmrg using std::isinf;
6636ac495dSmrg using std::isnan;
6736ac495dSmrg using std::isnormal;
6836ac495dSmrg using std::signbit;
6936ac495dSmrg using std::isgreater;
7036ac495dSmrg using std::isgreaterequal;
7136ac495dSmrg using std::isless;
7236ac495dSmrg using std::islessequal;
7336ac495dSmrg using std::islessgreater;
7436ac495dSmrg using std::isunordered;
7536ac495dSmrg #endif
7636ac495dSmrg 
7736ac495dSmrg #if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1)
7836ac495dSmrg using std::acosh;
7936ac495dSmrg using std::asinh;
8036ac495dSmrg using std::atanh;
8136ac495dSmrg using std::cbrt;
8236ac495dSmrg using std::copysign;
8336ac495dSmrg using std::erf;
8436ac495dSmrg using std::erfc;
8536ac495dSmrg using std::exp2;
8636ac495dSmrg using std::expm1;
8736ac495dSmrg using std::fdim;
8836ac495dSmrg using std::fma;
8936ac495dSmrg using std::fmax;
9036ac495dSmrg using std::fmin;
9136ac495dSmrg using std::hypot;
9236ac495dSmrg using std::ilogb;
9336ac495dSmrg using std::lgamma;
9436ac495dSmrg using std::llrint;
9536ac495dSmrg using std::llround;
9636ac495dSmrg using std::log1p;
9736ac495dSmrg using std::log2;
9836ac495dSmrg using std::logb;
9936ac495dSmrg using std::lrint;
10036ac495dSmrg using std::lround;
10136ac495dSmrg using std::nearbyint;
10236ac495dSmrg using std::nextafter;
10336ac495dSmrg using std::nexttoward;
10436ac495dSmrg using std::remainder;
10536ac495dSmrg using std::remquo;
10636ac495dSmrg using std::rint;
10736ac495dSmrg using std::round;
10836ac495dSmrg using std::scalbln;
10936ac495dSmrg using std::scalbn;
11036ac495dSmrg using std::tgamma;
11136ac495dSmrg using std::trunc;
11236ac495dSmrg #endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1
11336ac495dSmrg 
114c0a68be4Smrg // The mathematical special functions are only added to the global namespace
115c0a68be4Smrg // by IS 29124, but not by C++17.
116c0a68be4Smrg #if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
11736ac495dSmrg using std::assoc_laguerref;
11836ac495dSmrg using std::assoc_laguerrel;
11936ac495dSmrg using std::assoc_laguerre;
12036ac495dSmrg using std::assoc_legendref;
12136ac495dSmrg using std::assoc_legendrel;
12236ac495dSmrg using std::assoc_legendre;
12336ac495dSmrg using std::betaf;
12436ac495dSmrg using std::betal;
12536ac495dSmrg using std::beta;
12636ac495dSmrg using std::comp_ellint_1f;
12736ac495dSmrg using std::comp_ellint_1l;
12836ac495dSmrg using std::comp_ellint_1;
12936ac495dSmrg using std::comp_ellint_2f;
13036ac495dSmrg using std::comp_ellint_2l;
13136ac495dSmrg using std::comp_ellint_2;
13236ac495dSmrg using std::comp_ellint_3f;
13336ac495dSmrg using std::comp_ellint_3l;
13436ac495dSmrg using std::comp_ellint_3;
13536ac495dSmrg using std::cyl_bessel_if;
13636ac495dSmrg using std::cyl_bessel_il;
13736ac495dSmrg using std::cyl_bessel_i;
13836ac495dSmrg using std::cyl_bessel_jf;
13936ac495dSmrg using std::cyl_bessel_jl;
14036ac495dSmrg using std::cyl_bessel_j;
14136ac495dSmrg using std::cyl_bessel_kf;
14236ac495dSmrg using std::cyl_bessel_kl;
14336ac495dSmrg using std::cyl_bessel_k;
14436ac495dSmrg using std::cyl_neumannf;
14536ac495dSmrg using std::cyl_neumannl;
14636ac495dSmrg using std::cyl_neumann;
14736ac495dSmrg using std::ellint_1f;
14836ac495dSmrg using std::ellint_1l;
14936ac495dSmrg using std::ellint_1;
15036ac495dSmrg using std::ellint_2f;
15136ac495dSmrg using std::ellint_2l;
15236ac495dSmrg using std::ellint_2;
15336ac495dSmrg using std::ellint_3f;
15436ac495dSmrg using std::ellint_3l;
15536ac495dSmrg using std::ellint_3;
15636ac495dSmrg using std::expintf;
15736ac495dSmrg using std::expintl;
15836ac495dSmrg using std::expint;
15936ac495dSmrg using std::hermitef;
16036ac495dSmrg using std::hermitel;
16136ac495dSmrg using std::hermite;
16236ac495dSmrg using std::laguerref;
16336ac495dSmrg using std::laguerrel;
16436ac495dSmrg using std::laguerre;
16536ac495dSmrg using std::legendref;
16636ac495dSmrg using std::legendrel;
16736ac495dSmrg using std::legendre;
16836ac495dSmrg using std::riemann_zetaf;
16936ac495dSmrg using std::riemann_zetal;
17036ac495dSmrg using std::riemann_zeta;
17136ac495dSmrg using std::sph_besself;
17236ac495dSmrg using std::sph_bessell;
17336ac495dSmrg using std::sph_bessel;
17436ac495dSmrg using std::sph_legendref;
17536ac495dSmrg using std::sph_legendrel;
17636ac495dSmrg using std::sph_legendre;
17736ac495dSmrg using std::sph_neumannf;
17836ac495dSmrg using std::sph_neumannl;
17936ac495dSmrg using std::sph_neumann;
180a2dc1f3fSmrg #endif // _GLIBCXX_USE_STD_SPEC_FUNCS
18136ac495dSmrg 
182c0a68be4Smrg #if __cplusplus > 201703L
183c0a68be4Smrg using std::lerp;
184c0a68be4Smrg #endif // C++20
185c0a68be4Smrg 
18636ac495dSmrg #endif // _GLIBCXX_MATH_H
18736ac495dSmrg #endif // __cplusplus
188