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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « include/atomic ('k') | include/cstdio » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // -*- C++ -*- 1 // -*- C++ -*-
2 //===---------------------------- cmath -----------------------------------===// 2 //===---------------------------- cmath -----------------------------------===//
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open 6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details. 7 // Source Licenses. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 10
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 inline _LIBCPP_INLINE_VISIBILITY 1370 inline _LIBCPP_INLINE_VISIBILITY
1371 typename enable_if<is_integral<_A1>::value, double>::type 1371 typename enable_if<is_integral<_A1>::value, double>::type
1372 log1p(_A1 __lcpp_x) _NOEXCEPT {return log1p((double)__lcpp_x);} 1372 log1p(_A1 __lcpp_x) _NOEXCEPT {return log1p((double)__lcpp_x);}
1373 1373
1374 // log2 1374 // log2
1375 1375
1376 using ::log2; 1376 using ::log2;
1377 using ::log2f; 1377 using ::log2f;
1378 1378
1379 inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return log2f(__lcpp_x);} 1379 inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return log2f(__lcpp_x);}
1380 #if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that P NaCl represents ``long double`` as ``double``, hence the intrinsic's type.
1381 inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEP T {return __builtin_log2(__lcpp_x);}
1382 #else
1380 inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEP T {return log2l(__lcpp_x);} 1383 inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEP T {return log2l(__lcpp_x);}
1384 #endif // @LOCALMOD-END
1381 1385
1382 template <class _A1> 1386 template <class _A1>
1383 inline _LIBCPP_INLINE_VISIBILITY 1387 inline _LIBCPP_INLINE_VISIBILITY
1384 typename enable_if<is_integral<_A1>::value, double>::type 1388 typename enable_if<is_integral<_A1>::value, double>::type
1385 log2(_A1 __lcpp_x) _NOEXCEPT {return log2((double)__lcpp_x);} 1389 log2(_A1 __lcpp_x) _NOEXCEPT {return log2((double)__lcpp_x);}
1386 1390
1387 // logb 1391 // logb
1388 1392
1389 using ::logb; 1393 using ::logb;
1390 using ::logbf; 1394 using ::logbf;
1391 1395
1392 inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return logbf(__lcpp_x);} 1396 inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return logbf(__lcpp_x);}
1397 #if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that P NaCl represents ``long double`` as ``double``, hence the intrinsic's type.
1398 inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEP T {return __builtin_logb(__lcpp_x);}
1399 #else
1393 inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEP T {return logbl(__lcpp_x);} 1400 inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEP T {return logbl(__lcpp_x);}
1401 #endif // @LOCALMOD-END
1394 1402
1395 template <class _A1> 1403 template <class _A1>
1396 inline _LIBCPP_INLINE_VISIBILITY 1404 inline _LIBCPP_INLINE_VISIBILITY
1397 typename enable_if<is_integral<_A1>::value, double>::type 1405 typename enable_if<is_integral<_A1>::value, double>::type
1398 logb(_A1 __lcpp_x) _NOEXCEPT {return logb((double)__lcpp_x);} 1406 logb(_A1 __lcpp_x) _NOEXCEPT {return logb((double)__lcpp_x);}
1399 1407
1400 // lrint 1408 // lrint
1401 1409
1402 using ::lrint; 1410 using ::lrint;
1403 using ::lrintf; 1411 using ::lrintf;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT 1476 nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
1469 { 1477 {
1470 typedef typename __promote<_A1, _A2>::type __result_type; 1478 typedef typename __promote<_A1, _A2>::type __result_type;
1471 static_assert((!(is_same<_A1, __result_type>::value && 1479 static_assert((!(is_same<_A1, __result_type>::value &&
1472 is_same<_A2, __result_type>::value)), ""); 1480 is_same<_A2, __result_type>::value)), "");
1473 return nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y); 1481 return nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
1474 } 1482 }
1475 1483
1476 // nexttoward 1484 // nexttoward
1477 1485
1486 #if defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib. Note that P NaCl represents ``long double`` as ``double``, hence the intrinsic's type.
1487 inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long dou ble __lcpp_y) _NOEXCEPT {return __builtin_nexttoward(__lcpp_x, __lcpp_y);}
1488 inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, lo ng double __lcpp_y) _NOEXCEPT {return __builtin_nexttoward(__lcpp_x, __lcpp_y);}
1489
1490 template <class _A1>
1491 inline _LIBCPP_INLINE_VISIBILITY
1492 typename enable_if<is_integral<_A1>::value, double>::type
1493 nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return __builtin_nextt oward((double)__lcpp_x, __lcpp_y);}
1494 #else
1478 using ::nexttoward; 1495 using ::nexttoward;
1479 using ::nexttowardf; 1496 using ::nexttowardf;
1480 1497
1481 inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long dou ble __lcpp_y) _NOEXCEPT {return nexttowardf(__lcpp_x, __lcpp_y);} 1498 inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long dou ble __lcpp_y) _NOEXCEPT {return nexttowardf(__lcpp_x, __lcpp_y);}
1482 inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, lo ng double __lcpp_y) _NOEXCEPT {return nexttowardl(__lcpp_x, __lcpp_y);} 1499 inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, lo ng double __lcpp_y) _NOEXCEPT {return nexttowardl(__lcpp_x, __lcpp_y);}
1483 1500
1484 template <class _A1> 1501 template <class _A1>
1485 inline _LIBCPP_INLINE_VISIBILITY 1502 inline _LIBCPP_INLINE_VISIBILITY
1486 typename enable_if<is_integral<_A1>::value, double>::type 1503 typename enable_if<is_integral<_A1>::value, double>::type
1487 nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((dou ble)__lcpp_x, __lcpp_y);} 1504 nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((dou ble)__lcpp_x, __lcpp_y);}
1488 1505 #endif // @LOCALMOD-END
1489 // remainder 1506 // remainder
1490 1507
1491 using ::remainder; 1508 using ::remainder;
1492 using ::remainderf; 1509 using ::remainderf;
1493 1510
1494 inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __l cpp_y) _NOEXCEPT {return remainderf(__lcpp_x, __lcpp_y);} 1511 inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __l cpp_y) _NOEXCEPT {return remainderf(__lcpp_x, __lcpp_y);}
1495 inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, lon g double __lcpp_y) _NOEXCEPT {return remainderl(__lcpp_x, __lcpp_y);} 1512 inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, lon g double __lcpp_y) _NOEXCEPT {return remainderl(__lcpp_x, __lcpp_y);}
1496 1513
1497 template <class _A1, class _A2> 1514 template <class _A1, class _A2>
1498 inline _LIBCPP_INLINE_VISIBILITY 1515 inline _LIBCPP_INLINE_VISIBILITY
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 using ::fdiml; 1668 using ::fdiml;
1652 using ::fmal; 1669 using ::fmal;
1653 using ::fmaxl; 1670 using ::fmaxl;
1654 using ::fminl; 1671 using ::fminl;
1655 using ::hypotl; 1672 using ::hypotl;
1656 using ::ilogbl; 1673 using ::ilogbl;
1657 using ::lgammal; 1674 using ::lgammal;
1658 using ::llrintl; 1675 using ::llrintl;
1659 using ::llroundl; 1676 using ::llroundl;
1660 using ::log1pl; 1677 using ::log1pl;
1678 #if !defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib.
1661 using ::log2l; 1679 using ::log2l;
1662 using ::logbl; 1680 using ::logbl;
1681 #endif // @LOCALMOD-END
1663 using ::lrintl; 1682 using ::lrintl;
1664 using ::lroundl; 1683 using ::lroundl;
1665 using ::nanl; 1684 using ::nanl;
1666 using ::nearbyintl; 1685 using ::nearbyintl;
1667 using ::nextafterl; 1686 using ::nextafterl;
1687 #if !defined(_NEWLIB_VERSION) // @LOCALMOD-START Missing from newlib.
1668 using ::nexttowardl; 1688 using ::nexttowardl;
1689 #endif // @LOCALMOD-END
1669 using ::remainderl; 1690 using ::remainderl;
1670 using ::remquol; 1691 using ::remquol;
1671 using ::rintl; 1692 using ::rintl;
1672 using ::roundl; 1693 using ::roundl;
1673 using ::scalblnl; 1694 using ::scalblnl;
1674 using ::scalbnl; 1695 using ::scalbnl;
1675 using ::tgammal; 1696 using ::tgammal;
1676 using ::truncl; 1697 using ::truncl;
1677 #endif // !_LIBCPP_MSVCRT 1698 #endif // !_LIBCPP_MSVCRT
1678 1699
1679 #else 1700 #else
1680 using ::lgamma; 1701 using ::lgamma;
1681 using ::lgammaf; 1702 using ::lgammaf;
1682 #endif // __sun__ 1703 #endif // __sun__
1683 _LIBCPP_END_NAMESPACE_STD 1704 _LIBCPP_END_NAMESPACE_STD
1684 1705
1685 #endif // _LIBCPP_CMATH 1706 #endif // _LIBCPP_CMATH
OLDNEW
« 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