cmath 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  1. // -*- C++ -*-
  2. //===---------------------------- cmath -----------------------------------===//
  3. //
  4. // The LLVM Compiler Infrastructure
  5. //
  6. // This file is dual licensed under the MIT and the University of Illinois Open
  7. // Source Licenses. See LICENSE.TXT for details.
  8. //
  9. //===----------------------------------------------------------------------===//
  10. #ifndef _LIBCPP_CMATH
  11. #define _LIBCPP_CMATH
  12. /*
  13. cmath synopsis
  14. Macros:
  15. HUGE_VAL
  16. HUGE_VALF // C99
  17. HUGE_VALL // C99
  18. INFINITY // C99
  19. NAN // C99
  20. FP_INFINITE // C99
  21. FP_NAN // C99
  22. FP_NORMAL // C99
  23. FP_SUBNORMAL // C99
  24. FP_ZERO // C99
  25. FP_FAST_FMA // C99
  26. FP_FAST_FMAF // C99
  27. FP_FAST_FMAL // C99
  28. FP_ILOGB0 // C99
  29. FP_ILOGBNAN // C99
  30. MATH_ERRNO // C99
  31. MATH_ERREXCEPT // C99
  32. math_errhandling // C99
  33. namespace std
  34. {
  35. Types:
  36. float_t // C99
  37. double_t // C99
  38. // C90
  39. floating_point abs(floating_point x);
  40. floating_point acos (arithmetic x);
  41. float acosf(float x);
  42. long double acosl(long double x);
  43. floating_point asin (arithmetic x);
  44. float asinf(float x);
  45. long double asinl(long double x);
  46. floating_point atan (arithmetic x);
  47. float atanf(float x);
  48. long double atanl(long double x);
  49. floating_point atan2 (arithmetic y, arithmetic x);
  50. float atan2f(float y, float x);
  51. long double atan2l(long double y, long double x);
  52. floating_point ceil (arithmetic x);
  53. float ceilf(float x);
  54. long double ceill(long double x);
  55. floating_point cos (arithmetic x);
  56. float cosf(float x);
  57. long double cosl(long double x);
  58. floating_point cosh (arithmetic x);
  59. float coshf(float x);
  60. long double coshl(long double x);
  61. floating_point exp (arithmetic x);
  62. float expf(float x);
  63. long double expl(long double x);
  64. floating_point fabs (arithmetic x);
  65. float fabsf(float x);
  66. long double fabsl(long double x);
  67. floating_point floor (arithmetic x);
  68. float floorf(float x);
  69. long double floorl(long double x);
  70. floating_point fmod (arithmetic x, arithmetic y);
  71. float fmodf(float x, float y);
  72. long double fmodl(long double x, long double y);
  73. floating_point frexp (arithmetic value, int* exp);
  74. float frexpf(float value, int* exp);
  75. long double frexpl(long double value, int* exp);
  76. floating_point ldexp (arithmetic value, int exp);
  77. float ldexpf(float value, int exp);
  78. long double ldexpl(long double value, int exp);
  79. floating_point log (arithmetic x);
  80. float logf(float x);
  81. long double logl(long double x);
  82. floating_point log10 (arithmetic x);
  83. float log10f(float x);
  84. long double log10l(long double x);
  85. floating_point modf (floating_point value, floating_point* iptr);
  86. float modff(float value, float* iptr);
  87. long double modfl(long double value, long double* iptr);
  88. floating_point pow (arithmetic x, arithmetic y);
  89. float powf(float x, float y);
  90. long double powl(long double x, long double y);
  91. floating_point sin (arithmetic x);
  92. float sinf(float x);
  93. long double sinl(long double x);
  94. floating_point sinh (arithmetic x);
  95. float sinhf(float x);
  96. long double sinhl(long double x);
  97. floating_point sqrt (arithmetic x);
  98. float sqrtf(float x);
  99. long double sqrtl(long double x);
  100. floating_point tan (arithmetic x);
  101. float tanf(float x);
  102. long double tanl(long double x);
  103. floating_point tanh (arithmetic x);
  104. float tanhf(float x);
  105. long double tanhl(long double x);
  106. // C99
  107. bool signbit(arithmetic x);
  108. int fpclassify(arithmetic x);
  109. bool isfinite(arithmetic x);
  110. bool isinf(arithmetic x);
  111. bool isnan(arithmetic x);
  112. bool isnormal(arithmetic x);
  113. bool isgreater(arithmetic x, arithmetic y);
  114. bool isgreaterequal(arithmetic x, arithmetic y);
  115. bool isless(arithmetic x, arithmetic y);
  116. bool islessequal(arithmetic x, arithmetic y);
  117. bool islessgreater(arithmetic x, arithmetic y);
  118. bool isunordered(arithmetic x, arithmetic y);
  119. floating_point acosh (arithmetic x);
  120. float acoshf(float x);
  121. long double acoshl(long double x);
  122. floating_point asinh (arithmetic x);
  123. float asinhf(float x);
  124. long double asinhl(long double x);
  125. floating_point atanh (arithmetic x);
  126. float atanhf(float x);
  127. long double atanhl(long double x);
  128. floating_point cbrt (arithmetic x);
  129. float cbrtf(float x);
  130. long double cbrtl(long double x);
  131. floating_point copysign (arithmetic x, arithmetic y);
  132. float copysignf(float x, float y);
  133. long double copysignl(long double x, long double y);
  134. floating_point erf (arithmetic x);
  135. float erff(float x);
  136. long double erfl(long double x);
  137. floating_point erfc (arithmetic x);
  138. float erfcf(float x);
  139. long double erfcl(long double x);
  140. floating_point exp2 (arithmetic x);
  141. float exp2f(float x);
  142. long double exp2l(long double x);
  143. floating_point expm1 (arithmetic x);
  144. float expm1f(float x);
  145. long double expm1l(long double x);
  146. floating_point fdim (arithmetic x, arithmetic y);
  147. float fdimf(float x, float y);
  148. long double fdiml(long double x, long double y);
  149. floating_point fma (arithmetic x, arithmetic y, arithmetic z);
  150. float fmaf(float x, float y, float z);
  151. long double fmal(long double x, long double y, long double z);
  152. floating_point fmax (arithmetic x, arithmetic y);
  153. float fmaxf(float x, float y);
  154. long double fmaxl(long double x, long double y);
  155. floating_point fmin (arithmetic x, arithmetic y);
  156. float fminf(float x, float y);
  157. long double fminl(long double x, long double y);
  158. floating_point hypot (arithmetic x, arithmetic y);
  159. float hypotf(float x, float y);
  160. long double hypotl(long double x, long double y);
  161. int ilogb (arithmetic x);
  162. int ilogbf(float x);
  163. int ilogbl(long double x);
  164. floating_point lgamma (arithmetic x);
  165. float lgammaf(float x);
  166. long double lgammal(long double x);
  167. long long llrint (arithmetic x);
  168. long long llrintf(float x);
  169. long long llrintl(long double x);
  170. long long llround (arithmetic x);
  171. long long llroundf(float x);
  172. long long llroundl(long double x);
  173. floating_point log1p (arithmetic x);
  174. float log1pf(float x);
  175. long double log1pl(long double x);
  176. floating_point log2 (arithmetic x);
  177. float log2f(float x);
  178. long double log2l(long double x);
  179. floating_point logb (arithmetic x);
  180. float logbf(float x);
  181. long double logbl(long double x);
  182. long lrint (arithmetic x);
  183. long lrintf(float x);
  184. long lrintl(long double x);
  185. long lround (arithmetic x);
  186. long lroundf(float x);
  187. long lroundl(long double x);
  188. double nan (const char* str);
  189. float nanf(const char* str);
  190. long double nanl(const char* str);
  191. floating_point nearbyint (arithmetic x);
  192. float nearbyintf(float x);
  193. long double nearbyintl(long double x);
  194. floating_point nextafter (arithmetic x, arithmetic y);
  195. float nextafterf(float x, float y);
  196. long double nextafterl(long double x, long double y);
  197. floating_point nexttoward (arithmetic x, long double y);
  198. float nexttowardf(float x, long double y);
  199. long double nexttowardl(long double x, long double y);
  200. floating_point remainder (arithmetic x, arithmetic y);
  201. float remainderf(float x, float y);
  202. long double remainderl(long double x, long double y);
  203. floating_point remquo (arithmetic x, arithmetic y, int* pquo);
  204. float remquof(float x, float y, int* pquo);
  205. long double remquol(long double x, long double y, int* pquo);
  206. floating_point rint (arithmetic x);
  207. float rintf(float x);
  208. long double rintl(long double x);
  209. floating_point round (arithmetic x);
  210. float roundf(float x);
  211. long double roundl(long double x);
  212. floating_point scalbln (arithmetic x, long ex);
  213. float scalblnf(float x, long ex);
  214. long double scalblnl(long double x, long ex);
  215. floating_point scalbn (arithmetic x, int ex);
  216. float scalbnf(float x, int ex);
  217. long double scalbnl(long double x, int ex);
  218. floating_point tgamma (arithmetic x);
  219. float tgammaf(float x);
  220. long double tgammal(long double x);
  221. floating_point trunc (arithmetic x);
  222. float truncf(float x);
  223. long double truncl(long double x);
  224. } // std
  225. */
  226. #include <__config>
  227. #include <math.h>
  228. #include <type_traits>
  229. #ifdef _LIBCPP_MSVCRT
  230. #include "support/win32/math_win32.h"
  231. #endif
  232. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  233. #pragma GCC system_header
  234. #endif
  235. // signbit
  236. #ifdef signbit
  237. template <class _A1>
  238. _LIBCPP_ALWAYS_INLINE
  239. bool
  240. __libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT
  241. {
  242. return signbit(__lcpp_x);
  243. }
  244. #undef signbit
  245. template <class _A1>
  246. inline _LIBCPP_INLINE_VISIBILITY
  247. typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
  248. signbit(_A1 __lcpp_x) _NOEXCEPT
  249. {
  250. return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x);
  251. }
  252. #endif // signbit
  253. // fpclassify
  254. #ifdef fpclassify
  255. template <class _A1>
  256. _LIBCPP_ALWAYS_INLINE
  257. int
  258. __libcpp_fpclassify(_A1 __lcpp_x) _NOEXCEPT
  259. {
  260. return fpclassify(__lcpp_x);
  261. }
  262. #undef fpclassify
  263. template <class _A1>
  264. inline _LIBCPP_INLINE_VISIBILITY
  265. typename std::enable_if<std::is_arithmetic<_A1>::value, int>::type
  266. fpclassify(_A1 __lcpp_x) _NOEXCEPT
  267. {
  268. return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
  269. }
  270. #endif // fpclassify
  271. // isfinite
  272. #ifdef isfinite
  273. template <class _A1>
  274. _LIBCPP_ALWAYS_INLINE
  275. bool
  276. __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
  277. {
  278. return isfinite(__lcpp_x);
  279. }
  280. #undef isfinite
  281. template <class _A1>
  282. inline _LIBCPP_INLINE_VISIBILITY
  283. typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
  284. isfinite(_A1 __lcpp_x) _NOEXCEPT
  285. {
  286. return __libcpp_isfinite((typename std::__promote<_A1>::type)__lcpp_x);
  287. }
  288. #endif // isfinite
  289. // isinf
  290. #ifdef isinf
  291. template <class _A1>
  292. _LIBCPP_ALWAYS_INLINE
  293. bool
  294. __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
  295. {
  296. return isinf(__lcpp_x);
  297. }
  298. #undef isinf
  299. template <class _A1>
  300. inline _LIBCPP_INLINE_VISIBILITY
  301. typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
  302. isinf(_A1 __lcpp_x) _NOEXCEPT
  303. {
  304. return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x);
  305. }
  306. #endif // isinf
  307. // isnan
  308. #ifdef isnan
  309. template <class _A1>
  310. _LIBCPP_ALWAYS_INLINE
  311. bool
  312. __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
  313. {
  314. return isnan(__lcpp_x);
  315. }
  316. #undef isnan
  317. template <class _A1>
  318. inline _LIBCPP_INLINE_VISIBILITY
  319. typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
  320. isnan(_A1 __lcpp_x) _NOEXCEPT
  321. {
  322. return __libcpp_isnan((typename std::__promote<_A1>::type)__lcpp_x);
  323. }
  324. #endif // isnan
  325. // isnormal
  326. #ifdef isnormal
  327. template <class _A1>
  328. _LIBCPP_ALWAYS_INLINE
  329. bool
  330. __libcpp_isnormal(_A1 __lcpp_x) _NOEXCEPT
  331. {
  332. return isnormal(__lcpp_x);
  333. }
  334. #undef isnormal
  335. template <class _A1>
  336. inline _LIBCPP_INLINE_VISIBILITY
  337. typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
  338. isnormal(_A1 __lcpp_x) _NOEXCEPT
  339. {
  340. return __libcpp_isnormal((typename std::__promote<_A1>::type)__lcpp_x);
  341. }
  342. #endif // isnormal
  343. // isgreater
  344. #ifdef isgreater
  345. template <class _A1, class _A2>
  346. _LIBCPP_ALWAYS_INLINE
  347. bool
  348. __libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  349. {
  350. return isgreater(__lcpp_x, __lcpp_y);
  351. }
  352. #undef isgreater
  353. template <class _A1, class _A2>
  354. inline _LIBCPP_INLINE_VISIBILITY
  355. typename std::enable_if
  356. <
  357. std::is_arithmetic<_A1>::value &&
  358. std::is_arithmetic<_A2>::value,
  359. bool
  360. >::type
  361. isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  362. {
  363. typedef typename std::__promote<_A1, _A2>::type type;
  364. return __libcpp_isgreater((type)__lcpp_x, (type)__lcpp_y);
  365. }
  366. #endif // isgreater
  367. // isgreaterequal
  368. #ifdef isgreaterequal
  369. template <class _A1, class _A2>
  370. _LIBCPP_ALWAYS_INLINE
  371. bool
  372. __libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  373. {
  374. return isgreaterequal(__lcpp_x, __lcpp_y);
  375. }
  376. #undef isgreaterequal
  377. template <class _A1, class _A2>
  378. inline _LIBCPP_INLINE_VISIBILITY
  379. typename std::enable_if
  380. <
  381. std::is_arithmetic<_A1>::value &&
  382. std::is_arithmetic<_A2>::value,
  383. bool
  384. >::type
  385. isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  386. {
  387. typedef typename std::__promote<_A1, _A2>::type type;
  388. return __libcpp_isgreaterequal((type)__lcpp_x, (type)__lcpp_y);
  389. }
  390. #endif // isgreaterequal
  391. // isless
  392. #ifdef isless
  393. template <class _A1, class _A2>
  394. _LIBCPP_ALWAYS_INLINE
  395. bool
  396. __libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  397. {
  398. return isless(__lcpp_x, __lcpp_y);
  399. }
  400. #undef isless
  401. template <class _A1, class _A2>
  402. inline _LIBCPP_INLINE_VISIBILITY
  403. typename std::enable_if
  404. <
  405. std::is_arithmetic<_A1>::value &&
  406. std::is_arithmetic<_A2>::value,
  407. bool
  408. >::type
  409. isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  410. {
  411. typedef typename std::__promote<_A1, _A2>::type type;
  412. return __libcpp_isless((type)__lcpp_x, (type)__lcpp_y);
  413. }
  414. #endif // isless
  415. // islessequal
  416. #ifdef islessequal
  417. template <class _A1, class _A2>
  418. _LIBCPP_ALWAYS_INLINE
  419. bool
  420. __libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  421. {
  422. return islessequal(__lcpp_x, __lcpp_y);
  423. }
  424. #undef islessequal
  425. template <class _A1, class _A2>
  426. inline _LIBCPP_INLINE_VISIBILITY
  427. typename std::enable_if
  428. <
  429. std::is_arithmetic<_A1>::value &&
  430. std::is_arithmetic<_A2>::value,
  431. bool
  432. >::type
  433. islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  434. {
  435. typedef typename std::__promote<_A1, _A2>::type type;
  436. return __libcpp_islessequal((type)__lcpp_x, (type)__lcpp_y);
  437. }
  438. #endif // islessequal
  439. // islessgreater
  440. #ifdef islessgreater
  441. template <class _A1, class _A2>
  442. _LIBCPP_ALWAYS_INLINE
  443. bool
  444. __libcpp_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  445. {
  446. return islessgreater(__lcpp_x, __lcpp_y);
  447. }
  448. #undef islessgreater
  449. template <class _A1, class _A2>
  450. inline _LIBCPP_INLINE_VISIBILITY
  451. typename std::enable_if
  452. <
  453. std::is_arithmetic<_A1>::value &&
  454. std::is_arithmetic<_A2>::value,
  455. bool
  456. >::type
  457. islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  458. {
  459. typedef typename std::__promote<_A1, _A2>::type type;
  460. return __libcpp_islessgreater((type)__lcpp_x, (type)__lcpp_y);
  461. }
  462. #endif // islessgreater
  463. // isunordered
  464. #ifdef isunordered
  465. template <class _A1, class _A2>
  466. _LIBCPP_ALWAYS_INLINE
  467. bool
  468. __libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  469. {
  470. return isunordered(__lcpp_x, __lcpp_y);
  471. }
  472. #undef isunordered
  473. template <class _A1, class _A2>
  474. inline _LIBCPP_INLINE_VISIBILITY
  475. typename std::enable_if
  476. <
  477. std::is_arithmetic<_A1>::value &&
  478. std::is_arithmetic<_A2>::value,
  479. bool
  480. >::type
  481. isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  482. {
  483. typedef typename std::__promote<_A1, _A2>::type type;
  484. return __libcpp_isunordered((type)__lcpp_x, (type)__lcpp_y);
  485. }
  486. #endif // isunordered
  487. _LIBCPP_BEGIN_NAMESPACE_STD
  488. using ::signbit;
  489. using ::fpclassify;
  490. using ::isfinite;
  491. using ::isinf;
  492. using ::isnan;
  493. using ::isnormal;
  494. using ::isgreater;
  495. using ::isgreaterequal;
  496. using ::isless;
  497. using ::islessequal;
  498. using ::islessgreater;
  499. using ::isunordered;
  500. using ::isunordered;
  501. using ::float_t;
  502. using ::double_t;
  503. // abs
  504. #if defined(__sun__)
  505. using ::abs;
  506. #endif
  507. #if !defined(_AIX) && !defined(__sun__)
  508. inline _LIBCPP_INLINE_VISIBILITY
  509. float
  510. abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
  511. inline _LIBCPP_INLINE_VISIBILITY
  512. double
  513. abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
  514. inline _LIBCPP_INLINE_VISIBILITY
  515. long double
  516. abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
  517. #endif // !defined(_AIX)
  518. #ifndef __sun__
  519. // acos
  520. using ::acos;
  521. using ::acosf;
  522. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  523. inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return acosf(__lcpp_x);}
  524. inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}
  525. #endif
  526. template <class _A1>
  527. inline _LIBCPP_INLINE_VISIBILITY
  528. typename enable_if<is_integral<_A1>::value, double>::type
  529. acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
  530. // asin
  531. using ::asin;
  532. using ::asinf;
  533. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  534. inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return asinf(__lcpp_x);}
  535. inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return asinl(__lcpp_x);}
  536. #endif
  537. template <class _A1>
  538. inline _LIBCPP_INLINE_VISIBILITY
  539. typename enable_if<is_integral<_A1>::value, double>::type
  540. asin(_A1 __lcpp_x) _NOEXCEPT {return asin((double)__lcpp_x);}
  541. // atan
  542. using ::atan;
  543. using ::atanf;
  544. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  545. inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return atanf(__lcpp_x);}
  546. inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return atanl(__lcpp_x);}
  547. #endif
  548. template <class _A1>
  549. inline _LIBCPP_INLINE_VISIBILITY
  550. typename enable_if<is_integral<_A1>::value, double>::type
  551. atan(_A1 __lcpp_x) _NOEXCEPT {return atan((double)__lcpp_x);}
  552. // atan2
  553. using ::atan2;
  554. using ::atan2f;
  555. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  556. inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return atan2f(__lcpp_y, __lcpp_x);}
  557. inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return atan2l(__lcpp_y, __lcpp_x);}
  558. #endif
  559. template <class _A1, class _A2>
  560. inline _LIBCPP_INLINE_VISIBILITY
  561. typename __lazy_enable_if
  562. <
  563. is_arithmetic<_A1>::value &&
  564. is_arithmetic<_A2>::value,
  565. __promote<_A1, _A2>
  566. >::type
  567. atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
  568. {
  569. typedef typename __promote<_A1, _A2>::type __result_type;
  570. static_assert((!(is_same<_A1, __result_type>::value &&
  571. is_same<_A2, __result_type>::value)), "");
  572. return atan2((__result_type)__lcpp_y, (__result_type)__lcpp_x);
  573. }
  574. // ceil
  575. using ::ceil;
  576. using ::ceilf;
  577. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  578. inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ceilf(__lcpp_x);}
  579. inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ceill(__lcpp_x);}
  580. #endif
  581. template <class _A1>
  582. inline _LIBCPP_INLINE_VISIBILITY
  583. typename enable_if<is_integral<_A1>::value, double>::type
  584. ceil(_A1 __lcpp_x) _NOEXCEPT {return ceil((double)__lcpp_x);}
  585. // cos
  586. using ::cos;
  587. using ::cosf;
  588. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  589. inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return cosf(__lcpp_x);}
  590. inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return cosl(__lcpp_x);}
  591. #endif
  592. template <class _A1>
  593. inline _LIBCPP_INLINE_VISIBILITY
  594. typename enable_if<is_integral<_A1>::value, double>::type
  595. cos(_A1 __lcpp_x) _NOEXCEPT {return cos((double)__lcpp_x);}
  596. // cosh
  597. using ::cosh;
  598. using ::coshf;
  599. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  600. inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return coshf(__lcpp_x);}
  601. inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return coshl(__lcpp_x);}
  602. #endif
  603. template <class _A1>
  604. inline _LIBCPP_INLINE_VISIBILITY
  605. typename enable_if<is_integral<_A1>::value, double>::type
  606. cosh(_A1 __lcpp_x) _NOEXCEPT {return cosh((double)__lcpp_x);}
  607. #endif // __sun__
  608. // exp
  609. using ::exp;
  610. using ::expf;
  611. #ifndef __sun__
  612. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  613. inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return expf(__lcpp_x);}
  614. inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return expl(__lcpp_x);}
  615. #endif
  616. template <class _A1>
  617. inline _LIBCPP_INLINE_VISIBILITY
  618. typename enable_if<is_integral<_A1>::value, double>::type
  619. exp(_A1 __lcpp_x) _NOEXCEPT {return exp((double)__lcpp_x);}
  620. // fabs
  621. using ::fabs;
  622. using ::fabsf;
  623. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  624. inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
  625. inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
  626. #endif
  627. template <class _A1>
  628. inline _LIBCPP_INLINE_VISIBILITY
  629. typename enable_if<is_integral<_A1>::value, double>::type
  630. fabs(_A1 __lcpp_x) _NOEXCEPT {return fabs((double)__lcpp_x);}
  631. // floor
  632. using ::floor;
  633. using ::floorf;
  634. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  635. inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return floorf(__lcpp_x);}
  636. inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return floorl(__lcpp_x);}
  637. #endif
  638. template <class _A1>
  639. inline _LIBCPP_INLINE_VISIBILITY
  640. typename enable_if<is_integral<_A1>::value, double>::type
  641. floor(_A1 __lcpp_x) _NOEXCEPT {return floor((double)__lcpp_x);}
  642. // fmod
  643. #endif //__sun__
  644. using ::fmod;
  645. using ::fmodf;
  646. #ifndef __sun__
  647. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  648. inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fmodf(__lcpp_x, __lcpp_y);}
  649. inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmodl(__lcpp_x, __lcpp_y);}
  650. #endif
  651. template <class _A1, class _A2>
  652. inline _LIBCPP_INLINE_VISIBILITY
  653. typename __lazy_enable_if
  654. <
  655. is_arithmetic<_A1>::value &&
  656. is_arithmetic<_A2>::value,
  657. __promote<_A1, _A2>
  658. >::type
  659. fmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  660. {
  661. typedef typename __promote<_A1, _A2>::type __result_type;
  662. static_assert((!(is_same<_A1, __result_type>::value &&
  663. is_same<_A2, __result_type>::value)), "");
  664. return fmod((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  665. }
  666. // frexp
  667. using ::frexp;
  668. using ::frexpf;
  669. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  670. inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpf(__lcpp_x, __lcpp_e);}
  671. inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexpl(__lcpp_x, __lcpp_e);}
  672. #endif
  673. template <class _A1>
  674. inline _LIBCPP_INLINE_VISIBILITY
  675. typename enable_if<is_integral<_A1>::value, double>::type
  676. frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return frexp((double)__lcpp_x, __lcpp_e);}
  677. // ldexp
  678. using ::ldexp;
  679. using ::ldexpf;
  680. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  681. inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpf(__lcpp_x, __lcpp_e);}
  682. inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexpl(__lcpp_x, __lcpp_e);}
  683. #endif
  684. template <class _A1>
  685. inline _LIBCPP_INLINE_VISIBILITY
  686. typename enable_if<is_integral<_A1>::value, double>::type
  687. ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ldexp((double)__lcpp_x, __lcpp_e);}
  688. // log
  689. #endif // __sun__
  690. using ::log;
  691. using ::logf;
  692. #ifndef __sun__
  693. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  694. inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return logf(__lcpp_x);}
  695. inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);}
  696. #endif
  697. template <class _A1>
  698. inline _LIBCPP_INLINE_VISIBILITY
  699. typename enable_if<is_integral<_A1>::value, double>::type
  700. log(_A1 __lcpp_x) _NOEXCEPT {return log((double)__lcpp_x);}
  701. // log10
  702. using ::log10;
  703. using ::log10f;
  704. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  705. inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return log10f(__lcpp_x);}
  706. inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return log10l(__lcpp_x);}
  707. #endif
  708. template <class _A1>
  709. inline _LIBCPP_INLINE_VISIBILITY
  710. typename enable_if<is_integral<_A1>::value, double>::type
  711. log10(_A1 __lcpp_x) _NOEXCEPT {return log10((double)__lcpp_x);}
  712. // modf
  713. using ::modf;
  714. using ::modff;
  715. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  716. inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return modff(__lcpp_x, __lcpp_y);}
  717. inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return modfl(__lcpp_x, __lcpp_y);}
  718. #endif
  719. // pow
  720. #endif // __sun__
  721. using ::pow;
  722. using ::powf;
  723. #ifndef __sun__
  724. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  725. inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return powf(__lcpp_x, __lcpp_y);}
  726. inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return powl(__lcpp_x, __lcpp_y);}
  727. #endif
  728. template <class _A1, class _A2>
  729. inline _LIBCPP_INLINE_VISIBILITY
  730. typename __lazy_enable_if
  731. <
  732. is_arithmetic<_A1>::value &&
  733. is_arithmetic<_A2>::value,
  734. __promote<_A1, _A2>
  735. >::type
  736. pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  737. {
  738. typedef typename __promote<_A1, _A2>::type __result_type;
  739. static_assert((!(is_same<_A1, __result_type>::value &&
  740. is_same<_A2, __result_type>::value)), "");
  741. return pow((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  742. }
  743. // sin
  744. using ::sin;
  745. using ::sinf;
  746. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  747. inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return sinf(__lcpp_x);}
  748. inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return sinl(__lcpp_x);}
  749. #endif
  750. template <class _A1>
  751. inline _LIBCPP_INLINE_VISIBILITY
  752. typename enable_if<is_integral<_A1>::value, double>::type
  753. sin(_A1 __lcpp_x) _NOEXCEPT {return sin((double)__lcpp_x);}
  754. // sinh
  755. using ::sinh;
  756. using ::sinhf;
  757. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  758. inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return sinhf(__lcpp_x);}
  759. inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return sinhl(__lcpp_x);}
  760. #endif
  761. template <class _A1>
  762. inline _LIBCPP_INLINE_VISIBILITY
  763. typename enable_if<is_integral<_A1>::value, double>::type
  764. sinh(_A1 __lcpp_x) _NOEXCEPT {return sinh((double)__lcpp_x);}
  765. // sqrt
  766. #endif // __sun__
  767. using ::sqrt;
  768. using ::sqrtf;
  769. #if !(defined(_LIBCPP_MSVCRT) || defined(__sun__) || defined(_AIX))
  770. inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return sqrtf(__lcpp_x);}
  771. inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return sqrtl(__lcpp_x);}
  772. #endif
  773. template <class _A1>
  774. inline _LIBCPP_INLINE_VISIBILITY
  775. typename enable_if<is_integral<_A1>::value, double>::type
  776. sqrt(_A1 __lcpp_x) _NOEXCEPT {return sqrt((double)__lcpp_x);}
  777. // tan
  778. using ::tan;
  779. using ::tanf;
  780. #ifndef __sun__
  781. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  782. inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return tanf(__lcpp_x);}
  783. inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return tanl(__lcpp_x);}
  784. #endif
  785. template <class _A1>
  786. inline _LIBCPP_INLINE_VISIBILITY
  787. typename enable_if<is_integral<_A1>::value, double>::type
  788. tan(_A1 __lcpp_x) _NOEXCEPT {return tan((double)__lcpp_x);}
  789. // tanh
  790. using ::tanh;
  791. using ::tanhf;
  792. #if !(defined(_LIBCPP_MSVCRT) || defined(_AIX))
  793. inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return tanhf(__lcpp_x);}
  794. inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return tanhl(__lcpp_x);}
  795. #endif
  796. template <class _A1>
  797. inline _LIBCPP_INLINE_VISIBILITY
  798. typename enable_if<is_integral<_A1>::value, double>::type
  799. tanh(_A1 __lcpp_x) _NOEXCEPT {return tanh((double)__lcpp_x);}
  800. // acosh
  801. #ifndef _LIBCPP_MSVCRT
  802. using ::acosh;
  803. using ::acoshf;
  804. inline _LIBCPP_INLINE_VISIBILITY float acosh(float __lcpp_x) _NOEXCEPT {return acoshf(__lcpp_x);}
  805. inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return acoshl(__lcpp_x);}
  806. template <class _A1>
  807. inline _LIBCPP_INLINE_VISIBILITY
  808. typename enable_if<is_integral<_A1>::value, double>::type
  809. acosh(_A1 __lcpp_x) _NOEXCEPT {return acosh((double)__lcpp_x);}
  810. #endif
  811. // asinh
  812. #ifndef _LIBCPP_MSVCRT
  813. using ::asinh;
  814. using ::asinhf;
  815. inline _LIBCPP_INLINE_VISIBILITY float asinh(float __lcpp_x) _NOEXCEPT {return asinhf(__lcpp_x);}
  816. inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return asinhl(__lcpp_x);}
  817. template <class _A1>
  818. inline _LIBCPP_INLINE_VISIBILITY
  819. typename enable_if<is_integral<_A1>::value, double>::type
  820. asinh(_A1 __lcpp_x) _NOEXCEPT {return asinh((double)__lcpp_x);}
  821. #endif
  822. // atanh
  823. #ifndef _LIBCPP_MSVCRT
  824. using ::atanh;
  825. using ::atanhf;
  826. inline _LIBCPP_INLINE_VISIBILITY float atanh(float __lcpp_x) _NOEXCEPT {return atanhf(__lcpp_x);}
  827. inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return atanhl(__lcpp_x);}
  828. template <class _A1>
  829. inline _LIBCPP_INLINE_VISIBILITY
  830. typename enable_if<is_integral<_A1>::value, double>::type
  831. atanh(_A1 __lcpp_x) _NOEXCEPT {return atanh((double)__lcpp_x);}
  832. #endif
  833. // cbrt
  834. #ifndef _LIBCPP_MSVCRT
  835. using ::cbrt;
  836. using ::cbrtf;
  837. inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return cbrtf(__lcpp_x);}
  838. inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return cbrtl(__lcpp_x);}
  839. template <class _A1>
  840. inline _LIBCPP_INLINE_VISIBILITY
  841. typename enable_if<is_integral<_A1>::value, double>::type
  842. cbrt(_A1 __lcpp_x) _NOEXCEPT {return cbrt((double)__lcpp_x);}
  843. #endif
  844. // copysign
  845. using ::copysign;
  846. using ::copysignf;
  847. #if !defined(_VC_CRT_MAJOR_VERSION) || (_VC_CRT_MAJOR_VERSION < 12)
  848. inline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x,
  849. float __lcpp_y) _NOEXCEPT {
  850. return copysignf(__lcpp_x, __lcpp_y);
  851. }
  852. inline _LIBCPP_INLINE_VISIBILITY long double
  853. copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
  854. return copysignl(__lcpp_x, __lcpp_y);
  855. }
  856. #endif
  857. template <class _A1, class _A2>
  858. inline _LIBCPP_INLINE_VISIBILITY
  859. typename __lazy_enable_if
  860. <
  861. is_arithmetic<_A1>::value &&
  862. is_arithmetic<_A2>::value,
  863. __promote<_A1, _A2>
  864. >::type
  865. copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  866. {
  867. typedef typename __promote<_A1, _A2>::type __result_type;
  868. static_assert((!(is_same<_A1, __result_type>::value &&
  869. is_same<_A2, __result_type>::value)), "");
  870. return copysign((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  871. }
  872. #ifndef _LIBCPP_MSVCRT
  873. // erf
  874. using ::erf;
  875. using ::erff;
  876. inline _LIBCPP_INLINE_VISIBILITY float erf(float __lcpp_x) _NOEXCEPT {return erff(__lcpp_x);}
  877. inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return erfl(__lcpp_x);}
  878. template <class _A1>
  879. inline _LIBCPP_INLINE_VISIBILITY
  880. typename enable_if<is_integral<_A1>::value, double>::type
  881. erf(_A1 __lcpp_x) _NOEXCEPT {return erf((double)__lcpp_x);}
  882. // erfc
  883. using ::erfc;
  884. using ::erfcf;
  885. inline _LIBCPP_INLINE_VISIBILITY float erfc(float __lcpp_x) _NOEXCEPT {return erfcf(__lcpp_x);}
  886. inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return erfcl(__lcpp_x);}
  887. template <class _A1>
  888. inline _LIBCPP_INLINE_VISIBILITY
  889. typename enable_if<is_integral<_A1>::value, double>::type
  890. erfc(_A1 __lcpp_x) _NOEXCEPT {return erfc((double)__lcpp_x);}
  891. // exp2
  892. using ::exp2;
  893. using ::exp2f;
  894. inline _LIBCPP_INLINE_VISIBILITY float exp2(float __lcpp_x) _NOEXCEPT {return exp2f(__lcpp_x);}
  895. inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return exp2l(__lcpp_x);}
  896. template <class _A1>
  897. inline _LIBCPP_INLINE_VISIBILITY
  898. typename enable_if<is_integral<_A1>::value, double>::type
  899. exp2(_A1 __lcpp_x) _NOEXCEPT {return exp2((double)__lcpp_x);}
  900. // expm1
  901. using ::expm1;
  902. using ::expm1f;
  903. inline _LIBCPP_INLINE_VISIBILITY float expm1(float __lcpp_x) _NOEXCEPT {return expm1f(__lcpp_x);}
  904. inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return expm1l(__lcpp_x);}
  905. template <class _A1>
  906. inline _LIBCPP_INLINE_VISIBILITY
  907. typename enable_if<is_integral<_A1>::value, double>::type
  908. expm1(_A1 __lcpp_x) _NOEXCEPT {return expm1((double)__lcpp_x);}
  909. // fdim
  910. using ::fdim;
  911. using ::fdimf;
  912. inline _LIBCPP_INLINE_VISIBILITY float fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fdimf(__lcpp_x, __lcpp_y);}
  913. inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fdiml(__lcpp_x, __lcpp_y);}
  914. template <class _A1, class _A2>
  915. inline _LIBCPP_INLINE_VISIBILITY
  916. typename __lazy_enable_if
  917. <
  918. is_arithmetic<_A1>::value &&
  919. is_arithmetic<_A2>::value,
  920. __promote<_A1, _A2>
  921. >::type
  922. fdim(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  923. {
  924. typedef typename __promote<_A1, _A2>::type __result_type;
  925. static_assert((!(is_same<_A1, __result_type>::value &&
  926. is_same<_A2, __result_type>::value)), "");
  927. return fdim((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  928. }
  929. // fma
  930. using ::fmaf;
  931. using ::fma;
  932. inline _LIBCPP_INLINE_VISIBILITY float fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT {return fmaf(__lcpp_x, __lcpp_y, __lcpp_z);}
  933. inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT {return fmal(__lcpp_x, __lcpp_y, __lcpp_z);}
  934. template <class _A1, class _A2, class _A3>
  935. inline _LIBCPP_INLINE_VISIBILITY
  936. typename __lazy_enable_if
  937. <
  938. is_arithmetic<_A1>::value &&
  939. is_arithmetic<_A2>::value &&
  940. is_arithmetic<_A3>::value,
  941. __promote<_A1, _A2, _A3>
  942. >::type
  943. fma(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
  944. {
  945. typedef typename __promote<_A1, _A2, _A3>::type __result_type;
  946. static_assert((!(is_same<_A1, __result_type>::value &&
  947. is_same<_A2, __result_type>::value &&
  948. is_same<_A3, __result_type>::value)), "");
  949. return fma((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
  950. }
  951. // fmax
  952. using ::fmax;
  953. using ::fmaxf;
  954. inline _LIBCPP_INLINE_VISIBILITY float fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fmaxf(__lcpp_x, __lcpp_y);}
  955. inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
  956. template <class _A1, class _A2>
  957. inline _LIBCPP_INLINE_VISIBILITY
  958. typename __lazy_enable_if
  959. <
  960. is_arithmetic<_A1>::value &&
  961. is_arithmetic<_A2>::value,
  962. __promote<_A1, _A2>
  963. >::type
  964. fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  965. {
  966. typedef typename __promote<_A1, _A2>::type __result_type;
  967. static_assert((!(is_same<_A1, __result_type>::value &&
  968. is_same<_A2, __result_type>::value)), "");
  969. return fmax((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  970. }
  971. // fmin
  972. using ::fmin;
  973. using ::fminf;
  974. inline _LIBCPP_INLINE_VISIBILITY float fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return fminf(__lcpp_x, __lcpp_y);}
  975. inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fminl(__lcpp_x, __lcpp_y);}
  976. template <class _A1, class _A2>
  977. inline _LIBCPP_INLINE_VISIBILITY
  978. typename __lazy_enable_if
  979. <
  980. is_arithmetic<_A1>::value &&
  981. is_arithmetic<_A2>::value,
  982. __promote<_A1, _A2>
  983. >::type
  984. fmin(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  985. {
  986. typedef typename __promote<_A1, _A2>::type __result_type;
  987. static_assert((!(is_same<_A1, __result_type>::value &&
  988. is_same<_A2, __result_type>::value)), "");
  989. return fmin((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  990. }
  991. // hypot
  992. using ::hypot;
  993. using ::hypotf;
  994. inline _LIBCPP_INLINE_VISIBILITY float hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return hypotf(__lcpp_x, __lcpp_y);}
  995. inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return hypotl(__lcpp_x, __lcpp_y);}
  996. template <class _A1, class _A2>
  997. inline _LIBCPP_INLINE_VISIBILITY
  998. typename __lazy_enable_if
  999. <
  1000. is_arithmetic<_A1>::value &&
  1001. is_arithmetic<_A2>::value,
  1002. __promote<_A1, _A2>
  1003. >::type
  1004. hypot(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  1005. {
  1006. typedef typename __promote<_A1, _A2>::type __result_type;
  1007. static_assert((!(is_same<_A1, __result_type>::value &&
  1008. is_same<_A2, __result_type>::value)), "");
  1009. return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  1010. }
  1011. // ilogb
  1012. using ::ilogb;
  1013. using ::ilogbf;
  1014. inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT {return ilogbf(__lcpp_x);}
  1015. inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ilogbl(__lcpp_x);}
  1016. template <class _A1>
  1017. inline _LIBCPP_INLINE_VISIBILITY
  1018. typename enable_if<is_integral<_A1>::value, int>::type
  1019. ilogb(_A1 __lcpp_x) _NOEXCEPT {return ilogb((double)__lcpp_x);}
  1020. // lgamma
  1021. using ::lgamma;
  1022. using ::lgammaf;
  1023. inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __lcpp_x) _NOEXCEPT {return lgammaf(__lcpp_x);}
  1024. inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return lgammal(__lcpp_x);}
  1025. template <class _A1>
  1026. inline _LIBCPP_INLINE_VISIBILITY
  1027. typename enable_if<is_integral<_A1>::value, double>::type
  1028. lgamma(_A1 __lcpp_x) _NOEXCEPT {return lgamma((double)__lcpp_x);}
  1029. // llrint
  1030. using ::llrint;
  1031. using ::llrintf;
  1032. inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT {return llrintf(__lcpp_x);}
  1033. inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT {return llrintl(__lcpp_x);}
  1034. template <class _A1>
  1035. inline _LIBCPP_INLINE_VISIBILITY
  1036. typename enable_if<is_integral<_A1>::value, long long>::type
  1037. llrint(_A1 __lcpp_x) _NOEXCEPT {return llrint((double)__lcpp_x);}
  1038. // llround
  1039. using ::llround;
  1040. using ::llroundf;
  1041. inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT {return llroundf(__lcpp_x);}
  1042. inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT {return llroundl(__lcpp_x);}
  1043. template <class _A1>
  1044. inline _LIBCPP_INLINE_VISIBILITY
  1045. typename enable_if<is_integral<_A1>::value, long long>::type
  1046. llround(_A1 __lcpp_x) _NOEXCEPT {return llround((double)__lcpp_x);}
  1047. // log1p
  1048. using ::log1p;
  1049. using ::log1pf;
  1050. inline _LIBCPP_INLINE_VISIBILITY float log1p(float __lcpp_x) _NOEXCEPT {return log1pf(__lcpp_x);}
  1051. inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return log1pl(__lcpp_x);}
  1052. template <class _A1>
  1053. inline _LIBCPP_INLINE_VISIBILITY
  1054. typename enable_if<is_integral<_A1>::value, double>::type
  1055. log1p(_A1 __lcpp_x) _NOEXCEPT {return log1p((double)__lcpp_x);}
  1056. // log2
  1057. using ::log2;
  1058. using ::log2f;
  1059. inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return log2f(__lcpp_x);}
  1060. inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return log2l(__lcpp_x);}
  1061. template <class _A1>
  1062. inline _LIBCPP_INLINE_VISIBILITY
  1063. typename enable_if<is_integral<_A1>::value, double>::type
  1064. log2(_A1 __lcpp_x) _NOEXCEPT {return log2((double)__lcpp_x);}
  1065. // logb
  1066. using ::logb;
  1067. using ::logbf;
  1068. inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return logbf(__lcpp_x);}
  1069. inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return logbl(__lcpp_x);}
  1070. template <class _A1>
  1071. inline _LIBCPP_INLINE_VISIBILITY
  1072. typename enable_if<is_integral<_A1>::value, double>::type
  1073. logb(_A1 __lcpp_x) _NOEXCEPT {return logb((double)__lcpp_x);}
  1074. // lrint
  1075. using ::lrint;
  1076. using ::lrintf;
  1077. inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT {return lrintf(__lcpp_x);}
  1078. inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT {return lrintl(__lcpp_x);}
  1079. template <class _A1>
  1080. inline _LIBCPP_INLINE_VISIBILITY
  1081. typename enable_if<is_integral<_A1>::value, long>::type
  1082. lrint(_A1 __lcpp_x) _NOEXCEPT {return lrint((double)__lcpp_x);}
  1083. // lround
  1084. using ::lround;
  1085. using ::lroundf;
  1086. inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT {return lroundf(__lcpp_x);}
  1087. inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT {return lroundl(__lcpp_x);}
  1088. template <class _A1>
  1089. inline _LIBCPP_INLINE_VISIBILITY
  1090. typename enable_if<is_integral<_A1>::value, long>::type
  1091. lround(_A1 __lcpp_x) _NOEXCEPT {return lround((double)__lcpp_x);}
  1092. #endif // _LIBCPP_MSVCRT
  1093. #endif // __sun__
  1094. // nan
  1095. #ifndef _LIBCPP_MSVCRT
  1096. using ::nan;
  1097. using ::nanf;
  1098. #endif // _LIBCPP_MSVCRT
  1099. #ifndef __sun__
  1100. #ifndef _LIBCPP_MSVCRT
  1101. // nearbyint
  1102. using ::nearbyint;
  1103. using ::nearbyintf;
  1104. inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __lcpp_x) _NOEXCEPT {return nearbyintf(__lcpp_x);}
  1105. inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return nearbyintl(__lcpp_x);}
  1106. template <class _A1>
  1107. inline _LIBCPP_INLINE_VISIBILITY
  1108. typename enable_if<is_integral<_A1>::value, double>::type
  1109. nearbyint(_A1 __lcpp_x) _NOEXCEPT {return nearbyint((double)__lcpp_x);}
  1110. // nextafter
  1111. using ::nextafter;
  1112. using ::nextafterf;
  1113. inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return nextafterf(__lcpp_x, __lcpp_y);}
  1114. inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nextafterl(__lcpp_x, __lcpp_y);}
  1115. template <class _A1, class _A2>
  1116. inline _LIBCPP_INLINE_VISIBILITY
  1117. typename __lazy_enable_if
  1118. <
  1119. is_arithmetic<_A1>::value &&
  1120. is_arithmetic<_A2>::value,
  1121. __promote<_A1, _A2>
  1122. >::type
  1123. nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  1124. {
  1125. typedef typename __promote<_A1, _A2>::type __result_type;
  1126. static_assert((!(is_same<_A1, __result_type>::value &&
  1127. is_same<_A2, __result_type>::value)), "");
  1128. return nextafter((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  1129. }
  1130. // nexttoward
  1131. using ::nexttoward;
  1132. using ::nexttowardf;
  1133. inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttowardf(__lcpp_x, __lcpp_y);}
  1134. inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttowardl(__lcpp_x, __lcpp_y);}
  1135. template <class _A1>
  1136. inline _LIBCPP_INLINE_VISIBILITY
  1137. typename enable_if<is_integral<_A1>::value, double>::type
  1138. nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return nexttoward((double)__lcpp_x, __lcpp_y);}
  1139. // remainder
  1140. using ::remainder;
  1141. using ::remainderf;
  1142. inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return remainderf(__lcpp_x, __lcpp_y);}
  1143. inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return remainderl(__lcpp_x, __lcpp_y);}
  1144. template <class _A1, class _A2>
  1145. inline _LIBCPP_INLINE_VISIBILITY
  1146. typename __lazy_enable_if
  1147. <
  1148. is_arithmetic<_A1>::value &&
  1149. is_arithmetic<_A2>::value,
  1150. __promote<_A1, _A2>
  1151. >::type
  1152. remainder(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
  1153. {
  1154. typedef typename __promote<_A1, _A2>::type __result_type;
  1155. static_assert((!(is_same<_A1, __result_type>::value &&
  1156. is_same<_A2, __result_type>::value)), "");
  1157. return remainder((__result_type)__lcpp_x, (__result_type)__lcpp_y);
  1158. }
  1159. // remquo
  1160. using ::remquo;
  1161. using ::remquof;
  1162. inline _LIBCPP_INLINE_VISIBILITY float remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT {return remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
  1163. inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
  1164. template <class _A1, class _A2>
  1165. inline _LIBCPP_INLINE_VISIBILITY
  1166. typename __lazy_enable_if
  1167. <
  1168. is_arithmetic<_A1>::value &&
  1169. is_arithmetic<_A2>::value,
  1170. __promote<_A1, _A2>
  1171. >::type
  1172. remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) _NOEXCEPT
  1173. {
  1174. typedef typename __promote<_A1, _A2>::type __result_type;
  1175. static_assert((!(is_same<_A1, __result_type>::value &&
  1176. is_same<_A2, __result_type>::value)), "");
  1177. return remquo((__result_type)__lcpp_x, (__result_type)__lcpp_y, __lcpp_z);
  1178. }
  1179. // rint
  1180. using ::rint;
  1181. using ::rintf;
  1182. inline _LIBCPP_INLINE_VISIBILITY float rint(float __lcpp_x) _NOEXCEPT {return rintf(__lcpp_x);}
  1183. inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT {return rintl(__lcpp_x);}
  1184. template <class _A1>
  1185. inline _LIBCPP_INLINE_VISIBILITY
  1186. typename enable_if<is_integral<_A1>::value, double>::type
  1187. rint(_A1 __lcpp_x) _NOEXCEPT {return rint((double)__lcpp_x);}
  1188. // round
  1189. using ::round;
  1190. using ::roundf;
  1191. inline _LIBCPP_INLINE_VISIBILITY float round(float __lcpp_x) _NOEXCEPT {return roundf(__lcpp_x);}
  1192. inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT {return roundl(__lcpp_x);}
  1193. template <class _A1>
  1194. inline _LIBCPP_INLINE_VISIBILITY
  1195. typename enable_if<is_integral<_A1>::value, double>::type
  1196. round(_A1 __lcpp_x) _NOEXCEPT {return round((double)__lcpp_x);}
  1197. // scalbln
  1198. using ::scalbln;
  1199. using ::scalblnf;
  1200. inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalblnf(__lcpp_x, __lcpp_y);}
  1201. inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalblnl(__lcpp_x, __lcpp_y);}
  1202. template <class _A1>
  1203. inline _LIBCPP_INLINE_VISIBILITY
  1204. typename enable_if<is_integral<_A1>::value, double>::type
  1205. scalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return scalbln((double)__lcpp_x, __lcpp_y);}
  1206. // scalbn
  1207. using ::scalbn;
  1208. using ::scalbnf;
  1209. inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnf(__lcpp_x, __lcpp_y);}
  1210. inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
  1211. template <class _A1>
  1212. inline _LIBCPP_INLINE_VISIBILITY
  1213. typename enable_if<is_integral<_A1>::value, double>::type
  1214. scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbn((double)__lcpp_x, __lcpp_y);}
  1215. // tgamma
  1216. using ::tgamma;
  1217. using ::tgammaf;
  1218. inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __lcpp_x) _NOEXCEPT {return tgammaf(__lcpp_x);}
  1219. inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return tgammal(__lcpp_x);}
  1220. template <class _A1>
  1221. inline _LIBCPP_INLINE_VISIBILITY
  1222. typename enable_if<is_integral<_A1>::value, double>::type
  1223. tgamma(_A1 __lcpp_x) _NOEXCEPT {return tgamma((double)__lcpp_x);}
  1224. // trunc
  1225. using ::trunc;
  1226. using ::truncf;
  1227. inline _LIBCPP_INLINE_VISIBILITY float trunc(float __lcpp_x) _NOEXCEPT {return truncf(__lcpp_x);}
  1228. inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT {return truncl(__lcpp_x);}
  1229. template <class _A1>
  1230. inline _LIBCPP_INLINE_VISIBILITY
  1231. typename enable_if<is_integral<_A1>::value, double>::type
  1232. trunc(_A1 __lcpp_x) _NOEXCEPT {return trunc((double)__lcpp_x);}
  1233. #endif // !_LIBCPP_MSVCRT
  1234. using ::acosl;
  1235. using ::asinl;
  1236. using ::atanl;
  1237. using ::atan2l;
  1238. using ::ceill;
  1239. using ::cosl;
  1240. using ::coshl;
  1241. using ::expl;
  1242. using ::fabsl;
  1243. using ::floorl;
  1244. using ::fmodl;
  1245. using ::frexpl;
  1246. using ::ldexpl;
  1247. using ::logl;
  1248. using ::log10l;
  1249. using ::modfl;
  1250. using ::powl;
  1251. using ::sinl;
  1252. using ::sinhl;
  1253. using ::sqrtl;
  1254. using ::tanl;
  1255. #ifndef _LIBCPP_MSVCRT
  1256. using ::tanhl;
  1257. using ::acoshl;
  1258. using ::asinhl;
  1259. using ::atanhl;
  1260. using ::cbrtl;
  1261. #endif // !_LIBCPP_MSVCRT
  1262. using ::copysignl;
  1263. #ifndef _LIBCPP_MSVCRT
  1264. using ::erfl;
  1265. using ::erfcl;
  1266. using ::exp2l;
  1267. using ::expm1l;
  1268. using ::fdiml;
  1269. using ::fmal;
  1270. using ::fmaxl;
  1271. using ::fminl;
  1272. using ::hypotl;
  1273. using ::ilogbl;
  1274. using ::lgammal;
  1275. using ::llrintl;
  1276. using ::llroundl;
  1277. using ::log1pl;
  1278. using ::log2l;
  1279. using ::logbl;
  1280. using ::lrintl;
  1281. using ::lroundl;
  1282. using ::nanl;
  1283. using ::nearbyintl;
  1284. using ::nextafterl;
  1285. using ::nexttowardl;
  1286. using ::remainderl;
  1287. using ::remquol;
  1288. using ::rintl;
  1289. using ::roundl;
  1290. using ::scalblnl;
  1291. using ::scalbnl;
  1292. using ::tgammal;
  1293. using ::truncl;
  1294. #endif // !_LIBCPP_MSVCRT
  1295. #else
  1296. using ::lgamma;
  1297. using ::lgammaf;
  1298. #endif // __sun__
  1299. _LIBCPP_END_NAMESPACE_STD
  1300. #endif // _LIBCPP_CMATH