summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/cmath
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/cmath')
-rw-r--r--contrib/libc++/include/cmath34
1 files changed, 31 insertions, 3 deletions
diff --git a/contrib/libc++/include/cmath b/contrib/libc++/include/cmath
index ab67112..026889f 100644
--- a/contrib/libc++/include/cmath
+++ b/contrib/libc++/include/cmath
@@ -653,6 +653,8 @@ inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_floating_point<_A1>::value, _A1>::type
abs(_A1 __x) {return fabs(__x);}
+#ifndef __sun__
+
// acos
using ::acos;
@@ -769,16 +771,20 @@ inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_integral<_A1>::value, double>::type
cosh(_A1 __x) {return cosh((double)__x);}
+#endif // __sun__
// exp
using ::exp;
using ::expf;
+#ifndef __sun__
+
#ifndef _MSC_VER
inline _LIBCPP_INLINE_VISIBILITY float exp(float __x) {return expf(__x);}
inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __x) {return expl(__x);}
#endif
+
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_integral<_A1>::value, double>::type
@@ -816,8 +822,10 @@ floor(_A1 __x) {return floor((double)__x);}
// fmod
+#endif //__sun__
using ::fmod;
using ::fmodf;
+#ifndef __sun__
#ifndef _MSC_VER
inline _LIBCPP_INLINE_VISIBILITY float fmod(float __x, float __y) {return fmodf(__x, __y);}
@@ -840,6 +848,7 @@ fmod(_A1 __x, _A2 __y)
return fmod((__result_type)__x, (__result_type)__y);
}
+
// frexp
using ::frexp;
@@ -872,8 +881,10 @@ ldexp(_A1 __x, int __e) {return ldexp((double)__x, __e);}
// log
+#endif // __sun__
using ::log;
using ::logf;
+#ifndef __sun__
#ifndef _MSC_VER
inline _LIBCPP_INLINE_VISIBILITY float log(float __x) {return logf(__x);}
@@ -885,6 +896,7 @@ inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_integral<_A1>::value, double>::type
log(_A1 __x) {return log((double)__x);}
+
// log10
using ::log10;
@@ -912,9 +924,12 @@ inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __x, long double*
// pow
+#endif // __sun__
using ::pow;
using ::powf;
+#ifndef __sun__
+
#ifndef _MSC_VER
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);}
@@ -936,6 +951,7 @@ pow(_A1 __x, _A2 __y)
return pow((__result_type)__x, (__result_type)__y);
}
+
// sin
using ::sin;
@@ -968,10 +984,12 @@ sinh(_A1 __x) {return sinh((double)__x);}
// sqrt
+#endif // __sun__
using ::sqrt;
using ::sqrtf;
-#ifndef _MSC_VER
+
+#if !(defined(_MSC_VER) || defined(__sun__))
inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __x) {return sqrtf(__x);}
inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __x) {return sqrtl(__x);}
#endif
@@ -985,6 +1003,7 @@ sqrt(_A1 __x) {return sqrt((double)__x);}
using ::tan;
using ::tanf;
+#ifndef __sun__
#ifndef _MSC_VER
inline _LIBCPP_INLINE_VISIBILITY float tan(float __x) {return tanf(__x);}
@@ -1294,11 +1313,13 @@ using ::lgammaf;
inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __x) {return lgammaf(__x);}
inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __x) {return lgammal(__x);}
+
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_integral<_A1>::value, double>::type
lgamma(_A1 __x) {return lgamma((double)__x);}
+
// llrint
using ::llrint;
@@ -1391,9 +1412,12 @@ typename enable_if<is_integral<_A1>::value, long>::type
lround(_A1 __x) {return lround((double)__x);}
// nan
-
+#endif // _MSC_VER
+#endif // __sun__
using ::nan;
using ::nanf;
+#ifndef __sun__
+#ifndef _MSC_VER
// nearbyint
@@ -1600,7 +1624,7 @@ using ::acoshl;
using ::asinhl;
using ::atanhl;
using ::cbrtl;
-#endif !_MSC_VER
+#endif // !_MSC_VER
using ::copysignl;
#ifndef _MSC_VER
using ::erfl;
@@ -1635,6 +1659,10 @@ using ::tgammal;
using ::truncl;
#endif // !_MSC_VER
+#else
+using ::lgamma;
+using ::lgammaf;
+#endif // __sun__
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_CMATH
OpenPOWER on IntegriCloud