Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: include/cmath

Issue 904473004: Rebased localmods in libcxx to 223109. (Closed)
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/atomic ('k') | include/cstdio » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/cmath
diff --git a/include/cmath b/include/cmath
index d3aa4beeb584f9a54ea0c98201e174e101c2853a..bddae84a88a150e301470aa54a2afab6d731575d 100644
--- a/include/cmath
+++ b/include/cmath
@@ -1377,7 +1377,11 @@ using ::log2;
using ::log2f;
inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return log2f(__lcpp_x);}
+#if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that PNaCl represents ``long double`` as ``double``, hence the intrinsic's type.
+inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return __builtin_log2(__lcpp_x);}
+#else
inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return log2l(__lcpp_x);}
+#endif // @LOCALMOD-END
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1390,7 +1394,11 @@ using ::logb;
using ::logbf;
inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return logbf(__lcpp_x);}
+#if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that PNaCl represents ``long double`` as ``double``, hence the intrinsic's type.
+inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return __builtin_logb(__lcpp_x);}
+#else
inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return logbl(__lcpp_x);}
+#endif // @LOCALMOD-END
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1475,6 +1483,15 @@ nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
// nexttoward
+#if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that PNaCl represents ``long double`` as ``double``, hence the intrinsic's type.
+inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return __builtin_nexttoward(__lcpp_x, __lcpp_y);}
+inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return __builtin_nexttoward(__lcpp_x, __lcpp_y);}
+
+template <class _A1>
+inline _LIBCPP_INLINE_VISIBILITY
+typename enable_if<is_integral<_A1>::value, double>::type
+nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return __builtin_nexttoward((double)__lcpp_x, __lcpp_y);}
+#else
using ::nexttoward;
using ::nexttowardf;
@@ -1485,7 +1502,7 @@ template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<is_integral<_A1>::value, double>::type
nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((double)__lcpp_x, __lcpp_y);}
-
+#endif // @LOCALMOD-END
// remainder
using ::remainder;
@@ -1658,14 +1675,18 @@ using ::lgammal;
using ::llrintl;
using ::llroundl;
using ::log1pl;
+#if !defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib.
using ::log2l;
using ::logbl;
+#endif // @LOCALMOD-END
using ::lrintl;
using ::lroundl;
using ::nanl;
using ::nearbyintl;
using ::nextafterl;
+#if !defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib.
using ::nexttowardl;
+#endif // @LOCALMOD-END
using ::remainderl;
using ::remquol;
using ::rintl;
« no previous file with comments | « include/atomic ('k') | include/cstdio » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698