math.h 4.5 KB

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