|
@@ -303,673 +303,663 @@ long double truncl(long double x);
|
|
|
|
|
|
#pragma GCC system_header
|
|
|
|
|
|
-_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
-
|
|
|
-using ::float_t;
|
|
|
-using ::double_t;
|
|
|
+// signbit
|
|
|
|
|
|
-// abs
|
|
|
+#ifdef signbit
|
|
|
|
|
|
template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, _A1>::type
|
|
|
-abs(_A1 __x) {return fabs(__x);}
|
|
|
-
|
|
|
-// acos
|
|
|
-
|
|
|
-using ::acos;
|
|
|
-using ::acosf;
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_signbit(_A1 __x)
|
|
|
+{
|
|
|
+ return signbit(__x);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float acos(float __x) {return acosf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __x) {return acosl(__x);}
|
|
|
+#undef signbit
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-acos(_A1 __x) {return acos((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
|
|
|
+signbit(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_signbit(__x);
|
|
|
+}
|
|
|
|
|
|
-// asin
|
|
|
+#endif // signbit
|
|
|
|
|
|
-using ::asin;
|
|
|
-using ::asinf;
|
|
|
+// fpclassify
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float asin(float __x) {return asinf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __x) {return asinl(__x);}
|
|
|
+#ifdef fpclassify
|
|
|
|
|
|
template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-asin(_A1 __x) {return asin((double)__x);}
|
|
|
-
|
|
|
-// atan
|
|
|
-
|
|
|
-using ::atan;
|
|
|
-using ::atanf;
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+int
|
|
|
+__libcpp_fpclassify(_A1 __x)
|
|
|
+{
|
|
|
+ return fpclassify(__x);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float atan(float __x) {return atanf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __x) {return atanl(__x);}
|
|
|
+#undef fpclassify
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-atan(_A1 __x) {return atan((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
|
|
|
+fpclassify(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_fpclassify(__x);
|
|
|
+}
|
|
|
|
|
|
-// atan2
|
|
|
+#endif // fpclassify
|
|
|
|
|
|
-using ::atan2;
|
|
|
-using ::atan2f;
|
|
|
+// isfinite
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float atan2(float __y, float __x) {return atan2f(__y, __x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __y, long double __x) {return atan2l(__y, __x);}
|
|
|
+#ifdef isfinite
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
-<
|
|
|
- is_arithmetic<_A1>::value &&
|
|
|
- is_arithmetic<_A2>::value,
|
|
|
- typename __promote<_A1, _A2>::type
|
|
|
->::type
|
|
|
-atan2(_A1 __y, _A2 __x)
|
|
|
+template <class _A1>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isfinite(_A1 __x)
|
|
|
{
|
|
|
- typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
- static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
- is_same<_A2, __result_type>::value)), "");
|
|
|
- return atan2((__result_type)__y, (__result_type)__x);
|
|
|
+ return isfinite(__x);
|
|
|
}
|
|
|
|
|
|
-// ceil
|
|
|
-
|
|
|
-using ::ceil;
|
|
|
-using ::ceilf;
|
|
|
-
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float ceil(float __x) {return ceilf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __x) {return ceill(__x);}
|
|
|
+#undef isfinite
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-ceil(_A1 __x) {return ceil((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
|
|
|
+isfinite(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_isfinite(__x);
|
|
|
+}
|
|
|
|
|
|
-// cos
|
|
|
+#endif // isfinite
|
|
|
|
|
|
-using ::cos;
|
|
|
-using ::cosf;
|
|
|
+// isinf
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float cos(float __x) {return cosf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __x) {return cosl(__x);}
|
|
|
+#ifdef isinf
|
|
|
|
|
|
template <class _A1>
|
|
|
-inline _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-cos(_A1 __x) {return cos((double)__x);}
|
|
|
-
|
|
|
-// cosh
|
|
|
-
|
|
|
-using ::cosh;
|
|
|
-using ::coshf;
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isinf(_A1 __x)
|
|
|
+{
|
|
|
+ return isinf(__x);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float cosh(float __x) {return coshf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __x) {return coshl(__x);}
|
|
|
+#undef isinf
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-cosh(_A1 __x) {return cosh((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
|
|
|
+isinf(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_isinf(__x);
|
|
|
+}
|
|
|
|
|
|
-// exp
|
|
|
+#endif // isinf
|
|
|
|
|
|
-using ::exp;
|
|
|
-using ::expf;
|
|
|
+// isnan
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float exp(float __x) {return expf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __x) {return expl(__x);}
|
|
|
+#ifdef isnan
|
|
|
|
|
|
template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-exp(_A1 __x) {return exp((double)__x);}
|
|
|
-
|
|
|
-// fabs
|
|
|
-
|
|
|
-using ::fabs;
|
|
|
-using ::fabsf;
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isnan(_A1 __x)
|
|
|
+{
|
|
|
+ return isnan(__x);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float fabs(float __x) {return fabsf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __x) {return fabsl(__x);}
|
|
|
+#undef isnan
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-fabs(_A1 __x) {return fabs((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
|
|
|
+isnan(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_isnan(__x);
|
|
|
+}
|
|
|
|
|
|
-// floor
|
|
|
+#endif // isnan
|
|
|
|
|
|
-using ::floor;
|
|
|
-using ::floorf;
|
|
|
+// isnormal
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float floor(float __x) {return floorf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __x) {return floorl(__x);}
|
|
|
+#ifdef isnormal
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isnormal(_A1 __x)
|
|
|
+{
|
|
|
+ return isnormal(__x);
|
|
|
+}
|
|
|
+
|
|
|
+#undef isnormal
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-floor(_A1 __x) {return floor((double)__x);}
|
|
|
+typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
|
|
|
+isnormal(_A1 __x)
|
|
|
+{
|
|
|
+ return __libcpp_isnormal(__x);
|
|
|
+}
|
|
|
|
|
|
-// fmod
|
|
|
+#endif // isnormal
|
|
|
|
|
|
-using ::fmod;
|
|
|
-using ::fmodf;
|
|
|
+// isgreater
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float fmod(float __x, float __y) {return fmodf(__x, __y);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __x, long double __y) {return fmodl(__x, __y);}
|
|
|
+#ifdef isgreater
|
|
|
+
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isgreater(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return isgreater(__x, __y);
|
|
|
+}
|
|
|
+
|
|
|
+#undef isgreater
|
|
|
|
|
|
template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
+typename std::enable_if
|
|
|
<
|
|
|
- is_arithmetic<_A1>::value &&
|
|
|
- is_arithmetic<_A2>::value,
|
|
|
- typename __promote<_A1, _A2>::type
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
>::type
|
|
|
-fmod(_A1 __x, _A2 __y)
|
|
|
+isgreater(_A1 __x, _A2 __y)
|
|
|
{
|
|
|
- typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
- static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
- is_same<_A2, __result_type>::value)), "");
|
|
|
- return fmod((__result_type)__x, (__result_type)__y);
|
|
|
+ return __libcpp_isgreater(__x, __y);
|
|
|
}
|
|
|
|
|
|
-// frexp
|
|
|
-
|
|
|
-using ::frexp;
|
|
|
-using ::frexpf;
|
|
|
-
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float frexp(float __x, int* __e) {return frexpf(__x, __e);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __x, int* __e) {return frexpl(__x, __e);}
|
|
|
+#endif // isgreater
|
|
|
|
|
|
-template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-frexp(_A1 __x, int* __e) {return frexp((double)__x, __e);}
|
|
|
+// isgreaterequal
|
|
|
|
|
|
-// ldexp
|
|
|
+#ifdef isgreaterequal
|
|
|
|
|
|
-using ::ldexp;
|
|
|
-using ::ldexpf;
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isgreaterequal(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return isgreaterequal(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __x, int __e) {return ldexpf(__x, __e);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __x, int __e) {return ldexpl(__x, __e);}
|
|
|
+#undef isgreaterequal
|
|
|
|
|
|
-template <class _A1>
|
|
|
+template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-ldexp(_A1 __x, int __e) {return ldexp((double)__x, __e);}
|
|
|
+typename std::enable_if
|
|
|
+<
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
+>::type
|
|
|
+isgreaterequal(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return __libcpp_isgreaterequal(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-// log
|
|
|
+#endif // isgreaterequal
|
|
|
|
|
|
-using ::log;
|
|
|
-using ::logf;
|
|
|
+// isless
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float log(float __x) {return logf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double log(long double __x) {return logl(__x);}
|
|
|
+#ifdef isless
|
|
|
|
|
|
-template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-log(_A1 __x) {return log((double)__x);}
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isless(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return isless(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-// log10
|
|
|
+#undef isless
|
|
|
|
|
|
-using ::log10;
|
|
|
-using ::log10f;
|
|
|
+template <class _A1, class _A2>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename std::enable_if
|
|
|
+<
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
+>::type
|
|
|
+isless(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return __libcpp_isless(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float log10(float __x) {return log10f(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __x) {return log10l(__x);}
|
|
|
+#endif // isless
|
|
|
|
|
|
-template <class _A1>
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-log10(_A1 __x) {return log10((double)__x);}
|
|
|
+// islessequal
|
|
|
|
|
|
-// modf
|
|
|
+#ifdef islessequal
|
|
|
|
|
|
-using ::modf;
|
|
|
-using ::modff;
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_islessequal(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return islessequal(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float modf(float __x, float* __y) {return modff(__x, __y);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __x, long double* __y) {return modfl(__x, __y);}
|
|
|
+#undef islessequal
|
|
|
|
|
|
-// pow
|
|
|
+template <class _A1, class _A2>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename std::enable_if
|
|
|
+<
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
+>::type
|
|
|
+islessequal(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return __libcpp_islessequal(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-using ::pow;
|
|
|
-using ::powf;
|
|
|
+#endif // islessequal
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float pow(float __x, float __y) {return powf(__x, __y);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __x, long double __y) {return powl(__x, __y);}
|
|
|
+// islessgreater
|
|
|
+
|
|
|
+#ifdef islessgreater
|
|
|
+
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_islessgreater(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return islessgreater(__x, __y);
|
|
|
+}
|
|
|
+
|
|
|
+#undef islessgreater
|
|
|
|
|
|
template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
+typename std::enable_if
|
|
|
<
|
|
|
- is_arithmetic<_A1>::value &&
|
|
|
- is_arithmetic<_A2>::value,
|
|
|
- typename __promote<_A1, _A2>::type
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
>::type
|
|
|
-pow(_A1 __x, _A2 __y)
|
|
|
+islessgreater(_A1 __x, _A2 __y)
|
|
|
{
|
|
|
- typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
- static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
- is_same<_A2, __result_type>::value)), "");
|
|
|
- return pow((__result_type)__x, (__result_type)__y);
|
|
|
+ return __libcpp_islessgreater(__x, __y);
|
|
|
}
|
|
|
|
|
|
-// sin
|
|
|
+#endif // islessgreater
|
|
|
|
|
|
-using ::sin;
|
|
|
-using ::sinf;
|
|
|
+// isunordered
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float sin(float __x) {return sinf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __x) {return sinl(__x);}
|
|
|
+#ifdef isunordered
|
|
|
|
|
|
-template <class _A1>
|
|
|
+template <class _A1, class _A2>
|
|
|
+_LIBCPP_ALWAYS_INLINE
|
|
|
+bool
|
|
|
+__libcpp_isunordered(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return isunordered(__x, __y);
|
|
|
+}
|
|
|
+
|
|
|
+#undef isunordered
|
|
|
+
|
|
|
+template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-sin(_A1 __x) {return sin((double)__x);}
|
|
|
+typename std::enable_if
|
|
|
+<
|
|
|
+ std::is_floating_point<_A1>::value &&
|
|
|
+ std::is_floating_point<_A2>::value,
|
|
|
+ bool
|
|
|
+>::type
|
|
|
+isunordered(_A1 __x, _A2 __y)
|
|
|
+{
|
|
|
+ return __libcpp_isunordered(__x, __y);
|
|
|
+}
|
|
|
|
|
|
-// sinh
|
|
|
+#endif // isunordered
|
|
|
|
|
|
-using ::sinh;
|
|
|
-using ::sinhf;
|
|
|
+_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float sinh(float __x) {return sinhf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __x) {return sinhl(__x);}
|
|
|
+using ::signbit;
|
|
|
+using ::fpclassify;
|
|
|
+using ::isfinite;
|
|
|
+using ::isinf;
|
|
|
+using ::isnan;
|
|
|
+using ::isnormal;
|
|
|
+using ::isgreater;
|
|
|
+using ::isgreaterequal;
|
|
|
+using ::isless;
|
|
|
+using ::islessequal;
|
|
|
+using ::islessgreater;
|
|
|
+using ::isunordered;
|
|
|
+using ::isunordered;
|
|
|
+
|
|
|
+using ::float_t;
|
|
|
+using ::double_t;
|
|
|
+
|
|
|
+// abs
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-sinh(_A1 __x) {return sinh((double)__x);}
|
|
|
+typename enable_if<is_floating_point<_A1>::value, _A1>::type
|
|
|
+abs(_A1 __x) {return fabs(__x);}
|
|
|
|
|
|
-// sqrt
|
|
|
+// acos
|
|
|
|
|
|
-using ::sqrt;
|
|
|
-using ::sqrtf;
|
|
|
+using ::acos;
|
|
|
+using ::acosf;
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __x) {return sqrtf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __x) {return sqrtl(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float acos(float __x) {return acosf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __x) {return acosl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-sqrt(_A1 __x) {return sqrt((double)__x);}
|
|
|
+acos(_A1 __x) {return acos((double)__x);}
|
|
|
|
|
|
-// tan
|
|
|
+// asin
|
|
|
|
|
|
-using ::tan;
|
|
|
-using ::tanf;
|
|
|
+using ::asin;
|
|
|
+using ::asinf;
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float tan(float __x) {return tanf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __x) {return tanl(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float asin(float __x) {return asinf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __x) {return asinl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-tan(_A1 __x) {return tan((double)__x);}
|
|
|
+asin(_A1 __x) {return asin((double)__x);}
|
|
|
|
|
|
-// tanh
|
|
|
+// atan
|
|
|
|
|
|
-using ::tanh;
|
|
|
-using ::tanhf;
|
|
|
+using ::atan;
|
|
|
+using ::atanf;
|
|
|
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY float tanh(float __x) {return tanhf(__x);}
|
|
|
-inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __x) {return tanhl(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float atan(float __x) {return atanf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __x) {return atanl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
-tanh(_A1 __x) {return tanh((double)__x);}
|
|
|
-
|
|
|
-// signbit
|
|
|
+atan(_A1 __x) {return atan((double)__x);}
|
|
|
|
|
|
-#ifndef signbit
|
|
|
-#error Implementation error: signbit not defined
|
|
|
-#else
|
|
|
+// atan2
|
|
|
|
|
|
-template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_signbit(_A1 __x)
|
|
|
-{
|
|
|
- return signbit(__x);
|
|
|
-}
|
|
|
+using ::atan2;
|
|
|
+using ::atan2f;
|
|
|
|
|
|
-#undef signbit
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float atan2(float __y, float __x) {return atan2f(__y, __x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __y, long double __x) {return atan2l(__y, __x);}
|
|
|
|
|
|
-template <class _A1>
|
|
|
+template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, bool>::type
|
|
|
-signbit(_A1 __x)
|
|
|
+typename enable_if
|
|
|
+<
|
|
|
+ is_arithmetic<_A1>::value &&
|
|
|
+ is_arithmetic<_A2>::value,
|
|
|
+ typename __promote<_A1, _A2>::type
|
|
|
+>::type
|
|
|
+atan2(_A1 __y, _A2 __x)
|
|
|
{
|
|
|
- return __libcpp_signbit(__x);
|
|
|
+ typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
+ static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
+ is_same<_A2, __result_type>::value)), "");
|
|
|
+ return atan2((__result_type)__y, (__result_type)__x);
|
|
|
}
|
|
|
|
|
|
-#endif // signbit
|
|
|
-
|
|
|
-// fpclassify
|
|
|
-
|
|
|
-#ifndef fpclassify
|
|
|
-#error Implementation error: fpclassify not defined
|
|
|
-#else
|
|
|
+// ceil
|
|
|
|
|
|
-template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-int
|
|
|
-__libcpp_fpclassify(_A1 __x)
|
|
|
-{
|
|
|
- return fpclassify(__x);
|
|
|
-}
|
|
|
+using ::ceil;
|
|
|
+using ::ceilf;
|
|
|
|
|
|
-#undef fpclassify
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float ceil(float __x) {return ceilf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __x) {return ceill(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, int>::type
|
|
|
-fpclassify(_A1 __x)
|
|
|
-{
|
|
|
- return __libcpp_fpclassify(__x);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+ceil(_A1 __x) {return ceil((double)__x);}
|
|
|
|
|
|
-#endif // fpclassify
|
|
|
+// cos
|
|
|
|
|
|
-// isfinite
|
|
|
+using ::cos;
|
|
|
+using ::cosf;
|
|
|
|
|
|
-#ifndef isfinite
|
|
|
-#error Implementation error: isfinite not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float cos(float __x) {return cosf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __x) {return cosl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isfinite(_A1 __x)
|
|
|
-{
|
|
|
- return isfinite(__x);
|
|
|
-}
|
|
|
+inline _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+cos(_A1 __x) {return cos((double)__x);}
|
|
|
|
|
|
-#undef isfinite
|
|
|
+// cosh
|
|
|
+
|
|
|
+using ::cosh;
|
|
|
+using ::coshf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float cosh(float __x) {return coshf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __x) {return coshl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, bool>::type
|
|
|
-isfinite(_A1 __x)
|
|
|
-{
|
|
|
- return __libcpp_isfinite(__x);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+cosh(_A1 __x) {return cosh((double)__x);}
|
|
|
|
|
|
-#endif // isfinite
|
|
|
+// exp
|
|
|
|
|
|
-// isinf
|
|
|
+using ::exp;
|
|
|
+using ::expf;
|
|
|
|
|
|
-#ifndef isinf
|
|
|
-#error Implementation error: isinf not defined
|
|
|
-#else
|
|
|
-
|
|
|
-template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isinf(_A1 __x)
|
|
|
-{
|
|
|
- return isinf(__x);
|
|
|
-}
|
|
|
-
|
|
|
-#undef isinf
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float exp(float __x) {return expf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __x) {return expl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, bool>::type
|
|
|
-isinf(_A1 __x)
|
|
|
-{
|
|
|
- return __libcpp_isinf(__x);
|
|
|
-}
|
|
|
-
|
|
|
-#endif // isinf
|
|
|
-
|
|
|
-// isnan
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+exp(_A1 __x) {return exp((double)__x);}
|
|
|
|
|
|
-#ifndef isnan
|
|
|
-#error Implementation error: isnan not defined
|
|
|
-#else
|
|
|
+// fabs
|
|
|
|
|
|
-template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isnan(_A1 __x)
|
|
|
-{
|
|
|
- return isnan(__x);
|
|
|
-}
|
|
|
+using ::fabs;
|
|
|
+using ::fabsf;
|
|
|
|
|
|
-#undef isnan
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float fabs(float __x) {return fabsf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __x) {return fabsl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, bool>::type
|
|
|
-isnan(_A1 __x)
|
|
|
-{
|
|
|
- return __libcpp_isnan(__x);
|
|
|
-}
|
|
|
-
|
|
|
-#endif // isnan
|
|
|
-
|
|
|
-// isnormal
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+fabs(_A1 __x) {return fabs((double)__x);}
|
|
|
|
|
|
-#ifndef isnormal
|
|
|
-#error Implementation error: isnormal not defined
|
|
|
-#else
|
|
|
+// floor
|
|
|
|
|
|
-template <class _A1>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isnormal(_A1 __x)
|
|
|
-{
|
|
|
- return isnormal(__x);
|
|
|
-}
|
|
|
+using ::floor;
|
|
|
+using ::floorf;
|
|
|
|
|
|
-#undef isnormal
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float floor(float __x) {return floorf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __x) {return floorl(__x);}
|
|
|
|
|
|
template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if<is_floating_point<_A1>::value, bool>::type
|
|
|
-isnormal(_A1 __x)
|
|
|
-{
|
|
|
- return __libcpp_isnormal(__x);
|
|
|
-}
|
|
|
-
|
|
|
-#endif // isnormal
|
|
|
-
|
|
|
-// isgreater
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+floor(_A1 __x) {return floor((double)__x);}
|
|
|
|
|
|
-#ifndef isgreater
|
|
|
-#error Implementation error: isgreater not defined
|
|
|
-#else
|
|
|
+// fmod
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isgreater(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return isgreater(__x, __y);
|
|
|
-}
|
|
|
+using ::fmod;
|
|
|
+using ::fmodf;
|
|
|
|
|
|
-#undef isgreater
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float fmod(float __x, float __y) {return fmodf(__x, __y);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __x, long double __y) {return fmodl(__x, __y);}
|
|
|
|
|
|
template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
typename enable_if
|
|
|
<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
+ is_arithmetic<_A1>::value &&
|
|
|
+ is_arithmetic<_A2>::value,
|
|
|
+ typename __promote<_A1, _A2>::type
|
|
|
>::type
|
|
|
-isgreater(_A1 __x, _A2 __y)
|
|
|
+fmod(_A1 __x, _A2 __y)
|
|
|
{
|
|
|
- return __libcpp_isgreater(__x, __y);
|
|
|
+ typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
+ static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
+ is_same<_A2, __result_type>::value)), "");
|
|
|
+ return fmod((__result_type)__x, (__result_type)__y);
|
|
|
}
|
|
|
|
|
|
-#endif // isgreater
|
|
|
+// frexp
|
|
|
|
|
|
-// isgreaterequal
|
|
|
+using ::frexp;
|
|
|
+using ::frexpf;
|
|
|
|
|
|
-#ifndef isgreaterequal
|
|
|
-#error Implementation error: isgreaterequal not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float frexp(float __x, int* __e) {return frexpf(__x, __e);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __x, int* __e) {return frexpl(__x, __e);}
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isgreaterequal(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return isgreaterequal(__x, __y);
|
|
|
-}
|
|
|
+template <class _A1>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+frexp(_A1 __x, int* __e) {return frexp((double)__x, __e);}
|
|
|
|
|
|
-#undef isgreaterequal
|
|
|
+// ldexp
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
+using ::ldexp;
|
|
|
+using ::ldexpf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __x, int __e) {return ldexpf(__x, __e);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __x, int __e) {return ldexpl(__x, __e);}
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
-<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
->::type
|
|
|
-isgreaterequal(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return __libcpp_isgreaterequal(__x, __y);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+ldexp(_A1 __x, int __e) {return ldexp((double)__x, __e);}
|
|
|
|
|
|
-#endif // isgreaterequal
|
|
|
+// log
|
|
|
|
|
|
-// isless
|
|
|
+using ::log;
|
|
|
+using ::logf;
|
|
|
|
|
|
-#ifndef isless
|
|
|
-#error Implementation error: isless not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float log(float __x) {return logf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double log(long double __x) {return logl(__x);}
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isless(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return isless(__x, __y);
|
|
|
-}
|
|
|
+template <class _A1>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+log(_A1 __x) {return log((double)__x);}
|
|
|
|
|
|
-#undef isless
|
|
|
+// log10
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
+using ::log10;
|
|
|
+using ::log10f;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float log10(float __x) {return log10f(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __x) {return log10l(__x);}
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
-<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
->::type
|
|
|
-isless(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return __libcpp_isless(__x, __y);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+log10(_A1 __x) {return log10((double)__x);}
|
|
|
|
|
|
-#endif // isless
|
|
|
+// modf
|
|
|
|
|
|
-// islessequal
|
|
|
+using ::modf;
|
|
|
+using ::modff;
|
|
|
|
|
|
-#ifndef islessequal
|
|
|
-#error Implementation error: islessequal not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float modf(float __x, float* __y) {return modff(__x, __y);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __x, long double* __y) {return modfl(__x, __y);}
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_islessequal(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return islessequal(__x, __y);
|
|
|
-}
|
|
|
+// pow
|
|
|
|
|
|
-#undef islessequal
|
|
|
+using ::pow;
|
|
|
+using ::powf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float pow(float __x, float __y) {return powf(__x, __y);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __x, long double __y) {return powl(__x, __y);}
|
|
|
|
|
|
template <class _A1, class _A2>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
typename enable_if
|
|
|
<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
+ is_arithmetic<_A1>::value &&
|
|
|
+ is_arithmetic<_A2>::value,
|
|
|
+ typename __promote<_A1, _A2>::type
|
|
|
>::type
|
|
|
-islessequal(_A1 __x, _A2 __y)
|
|
|
+pow(_A1 __x, _A2 __y)
|
|
|
{
|
|
|
- return __libcpp_islessequal(__x, __y);
|
|
|
+ typedef typename __promote<_A1, _A2>::type __result_type;
|
|
|
+ static_assert((!(is_same<_A1, __result_type>::value &&
|
|
|
+ is_same<_A2, __result_type>::value)), "");
|
|
|
+ return pow((__result_type)__x, (__result_type)__y);
|
|
|
}
|
|
|
|
|
|
-#endif // islessequal
|
|
|
+// sin
|
|
|
|
|
|
-// islessgreater
|
|
|
+using ::sin;
|
|
|
+using ::sinf;
|
|
|
|
|
|
-#ifndef islessgreater
|
|
|
-#error Implementation error: islessgreater not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float sin(float __x) {return sinf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __x) {return sinl(__x);}
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_islessgreater(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return islessgreater(__x, __y);
|
|
|
-}
|
|
|
+template <class _A1>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+sin(_A1 __x) {return sin((double)__x);}
|
|
|
|
|
|
-#undef islessgreater
|
|
|
+// sinh
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
+using ::sinh;
|
|
|
+using ::sinhf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float sinh(float __x) {return sinhf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __x) {return sinhl(__x);}
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
-<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
->::type
|
|
|
-islessgreater(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return __libcpp_islessgreater(__x, __y);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+sinh(_A1 __x) {return sinh((double)__x);}
|
|
|
|
|
|
-#endif // islessgreater
|
|
|
+// sqrt
|
|
|
|
|
|
-// isunordered
|
|
|
+using ::sqrt;
|
|
|
+using ::sqrtf;
|
|
|
|
|
|
-#ifndef isunordered
|
|
|
-#error Implementation error: isunordered not defined
|
|
|
-#else
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __x) {return sqrtf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __x) {return sqrtl(__x);}
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
-_LIBCPP_ALWAYS_INLINE
|
|
|
-bool
|
|
|
-__libcpp_isunordered(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return isunordered(__x, __y);
|
|
|
-}
|
|
|
+template <class _A1>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+sqrt(_A1 __x) {return sqrt((double)__x);}
|
|
|
|
|
|
-#undef isunordered
|
|
|
+// tan
|
|
|
|
|
|
-template <class _A1, class _A2>
|
|
|
+using ::tan;
|
|
|
+using ::tanf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float tan(float __x) {return tanf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __x) {return tanl(__x);}
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
inline _LIBCPP_INLINE_VISIBILITY
|
|
|
-typename enable_if
|
|
|
-<
|
|
|
- is_floating_point<_A1>::value &&
|
|
|
- is_floating_point<_A2>::value,
|
|
|
- bool
|
|
|
->::type
|
|
|
-isunordered(_A1 __x, _A2 __y)
|
|
|
-{
|
|
|
- return __libcpp_isunordered(__x, __y);
|
|
|
-}
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+tan(_A1 __x) {return tan((double)__x);}
|
|
|
|
|
|
-#endif // isunordered
|
|
|
+// tanh
|
|
|
+
|
|
|
+using ::tanh;
|
|
|
+using ::tanhf;
|
|
|
+
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY float tanh(float __x) {return tanhf(__x);}
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __x) {return tanhl(__x);}
|
|
|
+
|
|
|
+template <class _A1>
|
|
|
+inline _LIBCPP_INLINE_VISIBILITY
|
|
|
+typename enable_if<is_integral<_A1>::value, double>::type
|
|
|
+tanh(_A1 __x) {return tanh((double)__x);}
|
|
|
|
|
|
// acosh
|
|
|
|