summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/c_global/cmath
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/c_global/cmath')
-rw-r--r--libstdc++-v3/include/c_global/cmath217
1 files changed, 100 insertions, 117 deletions
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index 568eb354c2d..4dc029e4e26 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -151,15 +151,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_atan2l(__y, __x); }
#endif
- template<typename _Tp, typename _Up>
- inline _GLIBCXX_CONSTEXPR
- typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- atan2(_Tp __y, _Up __x)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return atan2(__type(__y), __type(__x));
- }
-
using ::ceil;
#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
@@ -286,15 +277,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_fmodl(__x, __y); }
#endif
- template<typename _Tp, typename _Up>
- inline _GLIBCXX_CONSTEXPR
- typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- fmod(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return fmod(__type(__x), __type(__y));
- }
-
using ::frexp;
#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
@@ -411,15 +393,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif
#endif
- template<typename _Tp, typename _Up>
- inline _GLIBCXX_CONSTEXPR
- typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- pow(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return pow(__type(__x), __type(__y));
- }
-
using ::sin;
#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
@@ -1073,6 +1046,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __gnu_cxx::__bfloat16_t(__builtin_tanhf(__x)); }
#endif
+ template<typename _Tp, typename _Up>
+ inline _GLIBCXX_CONSTEXPR
+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ atan2(_Tp __y, _Up __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return atan2(__type(__y), __type(__x));
+ }
+
+ template<typename _Tp, typename _Up>
+ inline _GLIBCXX_CONSTEXPR
+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fmod(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fmod(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ inline _GLIBCXX_CONSTEXPR
+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ pow(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return pow(__type(__x), __type(__y));
+ }
+
#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
@@ -2107,16 +2107,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_copysignl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- copysign(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return copysign(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
erf(float __x)
@@ -2199,16 +2189,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_fdiml(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- fdim(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return fdim(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
fma(float __x, float __y, float __z)
@@ -2219,16 +2199,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_fmal(__x, __y, __z); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up, typename _Vp>
- constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
- fma(_Tp __x, _Up __y, _Vp __z)
- {
- typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
- return fma(__type(__x), __type(__y), __type(__z));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
fmax(float __x, float __y)
@@ -2239,16 +2209,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_fmaxl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- fmax(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return fmax(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
fmin(float __x, float __y)
@@ -2259,16 +2219,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_fminl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- fmin(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return fmin(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
hypot(float __x, float __y)
@@ -2279,16 +2229,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_hypotl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- hypot(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return hypot(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr int
ilogb(float __x)
@@ -2481,16 +2421,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_nextafterl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- nextafter(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return nextafter(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
nexttoward(float __x, long double __y)
@@ -2519,16 +2449,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_remainderl(__x, __y); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- remainder(_Tp __x, _Up __y)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return remainder(__type(__x), __type(__y));
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
inline float
remquo(float __x, float __y, int* __pquo)
@@ -2539,16 +2459,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __builtin_remquol(__x, __y, __pquo); }
#endif
-#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
- template<typename _Tp, typename _Up>
- inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
- remquo(_Tp __x, _Up __y, int* __pquo)
- {
- typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
- return remquo(__type(__x), __type(__y), __pquo);
- }
-#endif
-
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr float
rint(float __x)
@@ -3555,6 +3465,79 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __gnu_cxx::__bfloat16_t(__builtin_truncf(__x)); }
#endif
+#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ copysign(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return copysign(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fdim(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fdim(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fmax(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fmax(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fmin(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fmin(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ hypot(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return hypot(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ nextafter(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return nextafter(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ remainder(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return remainder(__type(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ remquo(_Tp __x, _Up __y, int* __pquo)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return remquo(__type(__x), __type(__y), __pquo);
+ }
+
+ template<typename _Tp, typename _Up, typename _Vp>
+ constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
+ fma(_Tp __x, _Up __y, _Vp __z)
+ {
+ typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
+ return fma(__type(__x), __type(__y), __type(__z));
+ }
+#endif
#endif // _GLIBCXX_USE_C99_MATH_TR1
#endif // C++11