| 1 |
// -*- C++ -*- compatibility header. |
| 2 |
|
| 3 |
// Copyright (C) 2002-2021 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 |
|
| 38 |
using std::abs; |
| 39 |
using std::acos; |
| 40 |
using std::asin; |
| 41 |
using std::atan; |
| 42 |
using std::atan2; |
| 43 |
using std::cos; |
| 44 |
using std::sin; |
| 45 |
using std::tan; |
| 46 |
using std::cosh; |
| 47 |
using std::sinh; |
| 48 |
using std::tanh; |
| 49 |
using std::exp; |
| 50 |
using std::frexp; |
| 51 |
using std::ldexp; |
| 52 |
using std::log; |
| 53 |
using std::log10; |
| 54 |
using std::modf; |
| 55 |
using std::pow; |
| 56 |
using std::sqrt; |
| 57 |
using std::ceil; |
| 58 |
using std::fabs; |
| 59 |
using std::floor; |
| 60 |
using std::fmod; |
| 61 |
|
| 62 |
#if _GLIBCXX_USE_C99_MATH |
| 63 |
using std::fpclassify; |
| 64 |
using std::isfinite; |
| 65 |
using std::isinf; |
| 66 |
using std::isnan; |
| 67 |
using std::isnormal; |
| 68 |
using std::signbit; |
| 69 |
using std::isgreater; |
| 70 |
using std::isgreaterequal; |
| 71 |
using std::isless; |
| 72 |
using std::islessequal; |
| 73 |
using std::islessgreater; |
| 74 |
using std::isunordered; |
| 75 |
#endif |
| 76 |
|
| 77 |
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1) |
| 78 |
using std::acosh; |
| 79 |
using std::asinh; |
| 80 |
using std::atanh; |
| 81 |
using std::cbrt; |
| 82 |
using std::copysign; |
| 83 |
using std::erf; |
| 84 |
using std::erfc; |
| 85 |
using std::exp2; |
| 86 |
using std::expm1; |
| 87 |
using std::fdim; |
| 88 |
using std::fma; |
| 89 |
using std::fmax; |
| 90 |
using std::fmin; |
| 91 |
using std::hypot; |
| 92 |
using std::ilogb; |
| 93 |
using std::lgamma; |
| 94 |
using std::llrint; |
| 95 |
using std::llround; |
| 96 |
using std::log1p; |
| 97 |
using std::log2; |
| 98 |
using std::logb; |
| 99 |
using std::lrint; |
| 100 |
using std::lround; |
| 101 |
using std::nearbyint; |
| 102 |
using std::nextafter; |
| 103 |
using std::nexttoward; |
| 104 |
using std::remainder; |
| 105 |
using std::remquo; |
| 106 |
using std::rint; |
| 107 |
using std::round; |
| 108 |
using std::scalbln; |
| 109 |
using std::scalbn; |
| 110 |
using std::tgamma; |
| 111 |
using 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 |
| 117 |
using std::assoc_laguerref; |
| 118 |
using std::assoc_laguerrel; |
| 119 |
using std::assoc_laguerre; |
| 120 |
using std::assoc_legendref; |
| 121 |
using std::assoc_legendrel; |
| 122 |
using std::assoc_legendre; |
| 123 |
using std::betaf; |
| 124 |
using std::betal; |
| 125 |
using std::beta; |
| 126 |
using std::comp_ellint_1f; |
| 127 |
using std::comp_ellint_1l; |
| 128 |
using std::comp_ellint_1; |
| 129 |
using std::comp_ellint_2f; |
| 130 |
using std::comp_ellint_2l; |
| 131 |
using std::comp_ellint_2; |
| 132 |
using std::comp_ellint_3f; |
| 133 |
using std::comp_ellint_3l; |
| 134 |
using std::comp_ellint_3; |
| 135 |
using std::cyl_bessel_if; |
| 136 |
using std::cyl_bessel_il; |
| 137 |
using std::cyl_bessel_i; |
| 138 |
using std::cyl_bessel_jf; |
| 139 |
using std::cyl_bessel_jl; |
| 140 |
using std::cyl_bessel_j; |
| 141 |
using std::cyl_bessel_kf; |
| 142 |
using std::cyl_bessel_kl; |
| 143 |
using std::cyl_bessel_k; |
| 144 |
using std::cyl_neumannf; |
| 145 |
using std::cyl_neumannl; |
| 146 |
using std::cyl_neumann; |
| 147 |
using std::ellint_1f; |
| 148 |
using std::ellint_1l; |
| 149 |
using std::ellint_1; |
| 150 |
using std::ellint_2f; |
| 151 |
using std::ellint_2l; |
| 152 |
using std::ellint_2; |
| 153 |
using std::ellint_3f; |
| 154 |
using std::ellint_3l; |
| 155 |
using std::ellint_3; |
| 156 |
using std::expintf; |
| 157 |
using std::expintl; |
| 158 |
using std::expint; |
| 159 |
using std::hermitef; |
| 160 |
using std::hermitel; |
| 161 |
using std::hermite; |
| 162 |
using std::laguerref; |
| 163 |
using std::laguerrel; |
| 164 |
using std::laguerre; |
| 165 |
using std::legendref; |
| 166 |
using std::legendrel; |
| 167 |
using std::legendre; |
| 168 |
using std::riemann_zetaf; |
| 169 |
using std::riemann_zetal; |
| 170 |
using std::riemann_zeta; |
| 171 |
using std::sph_besself; |
| 172 |
using std::sph_bessell; |
| 173 |
using std::sph_bessel; |
| 174 |
using std::sph_legendref; |
| 175 |
using std::sph_legendrel; |
| 176 |
using std::sph_legendre; |
| 177 |
using std::sph_neumannf; |
| 178 |
using std::sph_neumannl; |
| 179 |
using std::sph_neumann; |
| 180 |
#endif // _GLIBCXX_USE_STD_SPEC_FUNCS |
| 181 |
|
| 182 |
#if __cplusplus > 201703L |
| 183 |
using std::lerp; |
| 184 |
#endif // C++20 |
| 185 |
|
| 186 |
#endif // _GLIBCXX_MATH_H |
| 187 |
#endif // __cplusplus |