30 #if _GLIBCXX_USE_C99_MATH_TR1
142 _GLIBCXX_BEGIN_NAMESPACE_TR1
144 #if _GLIBCXX_USE_C99_MATH_TR1
293 #if _GLIBCXX_USE_C99_MATH
294 #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
299 using std::fpclassify;
306 using std::isgreater;
307 using std::isgreaterequal;
309 using std::islessequal;
310 using std::islessgreater;
311 using std::isunordered;
315 #if _GLIBCXX_USE_C99_MATH_TR1
322 {
return __builtin_acoshf(__x); }
325 acosh(
long double __x)
326 {
return __builtin_acoshl(__x); }
328 template<
typename _Tp>
329 inline typename __gnu_cxx::__promote<_Tp>::__type
332 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
333 return acosh(__type(__x));
340 {
return __builtin_asinhf(__x); }
343 asinh(
long double __x)
344 {
return __builtin_asinhl(__x); }
346 template<
typename _Tp>
347 inline typename __gnu_cxx::__promote<_Tp>::__type
350 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
351 return asinh(__type(__x));
359 {
return __builtin_atanhf(__x); }
362 atanh(
long double __x)
363 {
return __builtin_atanhl(__x); }
365 template<
typename _Tp>
366 inline typename __gnu_cxx::__promote<_Tp>::__type
369 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
370 return atanh(__type(__x));
375 {
return __builtin_cbrtf(__x); }
378 cbrt(
long double __x)
379 {
return __builtin_cbrtl(__x); }
381 template<
typename _Tp>
382 inline typename __gnu_cxx::__promote<_Tp>::__type
385 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
386 return cbrt(__type(__x));
392 copysign(
float __x,
float __y)
393 {
return __builtin_copysignf(__x, __y); }
396 copysign(
long double __x,
long double __y)
397 {
return __builtin_copysignl(__x, __y); }
399 template<
typename _Tp,
typename _Up>
400 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
401 copysign(_Tp __x, _Up __y)
403 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
404 return copysign(__type(__x), __type(__y));
412 {
return __builtin_erff(__x); }
416 {
return __builtin_erfl(__x); }
418 template<
typename _Tp>
419 inline typename __gnu_cxx::__promote<_Tp>::__type
422 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
423 return erf(__type(__x));
428 {
return __builtin_erfcf(__x); }
431 erfc(
long double __x)
432 {
return __builtin_erfcl(__x); }
434 template<
typename _Tp>
435 inline typename __gnu_cxx::__promote<_Tp>::__type
438 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
439 return erfc(__type(__x));
446 {
return __builtin_exp2f(__x); }
449 exp2(
long double __x)
450 {
return __builtin_exp2l(__x); }
452 template<
typename _Tp>
453 inline typename __gnu_cxx::__promote<_Tp>::__type
456 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
457 return exp2(__type(__x));
462 {
return __builtin_expm1f(__x); }
465 expm1(
long double __x)
466 {
return __builtin_expm1l(__x); }
468 template<
typename _Tp>
469 inline typename __gnu_cxx::__promote<_Tp>::__type
472 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
473 return expm1(__type(__x));
479 fdim(
float __x,
float __y)
480 {
return __builtin_fdimf(__x, __y); }
483 fdim(
long double __x,
long double __y)
484 {
return __builtin_fdiml(__x, __y); }
486 template<
typename _Tp,
typename _Up>
487 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
488 fdim(_Tp __x, _Up __y)
490 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
491 return fdim(__type(__x), __type(__y));
497 fma(
float __x,
float __y,
float __z)
498 {
return __builtin_fmaf(__x, __y, __z); }
501 fma(
long double __x,
long double __y,
long double __z)
502 {
return __builtin_fmal(__x, __y, __z); }
504 template<
typename _Tp,
typename _Up,
typename _Vp>
505 inline typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
506 fma(_Tp __x, _Up __y, _Vp __z)
508 typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
509 return fma(__type(__x), __type(__y), __type(__z));
513 fmax(
float __x,
float __y)
514 {
return __builtin_fmaxf(__x, __y); }
517 fmax(
long double __x,
long double __y)
518 {
return __builtin_fmaxl(__x, __y); }
520 template<
typename _Tp,
typename _Up>
521 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
522 fmax(_Tp __x, _Up __y)
524 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
525 return fmax(__type(__x), __type(__y));
529 fmin(
float __x,
float __y)
530 {
return __builtin_fminf(__x, __y); }
533 fmin(
long double __x,
long double __y)
534 {
return __builtin_fminl(__x, __y); }
536 template<
typename _Tp,
typename _Up>
537 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
538 fmin(_Tp __x, _Up __y)
540 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
541 return fmin(__type(__x), __type(__y));
548 hypot(
float __x,
float __y)
549 {
return __builtin_hypotf(__x, __y); }
552 hypot(
long double __x,
long double __y)
553 {
return __builtin_hypotl(__x, __y); }
555 template<
typename _Tp,
typename _Up>
556 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
557 hypot(_Tp __x, _Up __y)
559 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
560 return hypot(__type(__x), __type(__y));
565 {
return __builtin_ilogbf(__x); }
568 ilogb(
long double __x)
569 {
return __builtin_ilogbl(__x); }
571 template<
typename _Tp>
575 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
576 return ilogb(__type(__x));
583 {
return __builtin_lgammaf(__x); }
586 lgamma(
long double __x)
587 {
return __builtin_lgammal(__x); }
589 template<
typename _Tp>
590 inline typename __gnu_cxx::__promote<_Tp>::__type
593 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
594 return lgamma(__type(__x));
599 {
return __builtin_llrintf(__x); }
602 llrint(
long double __x)
603 {
return __builtin_llrintl(__x); }
605 template<
typename _Tp>
609 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
610 return llrint(__type(__x));
615 {
return __builtin_llroundf(__x); }
618 llround(
long double __x)
619 {
return __builtin_llroundl(__x); }
621 template<
typename _Tp>
625 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
626 return llround(__type(__x));
634 {
return __builtin_log1pf(__x); }
637 log1p(
long double __x)
638 {
return __builtin_log1pl(__x); }
640 template<
typename _Tp>
641 inline typename __gnu_cxx::__promote<_Tp>::__type
644 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
645 return log1p(__type(__x));
651 {
return __builtin_log2f(__x); }
654 log2(
long double __x)
655 {
return __builtin_log2l(__x); }
657 template<
typename _Tp>
658 inline typename __gnu_cxx::__promote<_Tp>::__type
661 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
662 return log2(__type(__x));
667 {
return __builtin_logbf(__x); }
670 logb(
long double __x)
671 {
return __builtin_logbl(__x); }
673 template<
typename _Tp>
674 inline typename __gnu_cxx::__promote<_Tp>::__type
677 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
678 return logb(__type(__x));
683 {
return __builtin_lrintf(__x); }
686 lrint(
long double __x)
687 {
return __builtin_lrintl(__x); }
689 template<
typename _Tp>
693 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
694 return lrint(__type(__x));
699 {
return __builtin_lroundf(__x); }
702 lround(
long double __x)
703 {
return __builtin_lroundl(__x); }
705 template<
typename _Tp>
709 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
710 return lround(__type(__x));
715 {
return __builtin_nearbyintf(__x); }
718 nearbyint(
long double __x)
719 {
return __builtin_nearbyintl(__x); }
721 template<
typename _Tp>
722 inline typename __gnu_cxx::__promote<_Tp>::__type
725 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
726 return nearbyint(__type(__x));
730 nextafter(
float __x,
float __y)
731 {
return __builtin_nextafterf(__x, __y); }
734 nextafter(
long double __x,
long double __y)
735 {
return __builtin_nextafterl(__x, __y); }
737 template<
typename _Tp,
typename _Up>
738 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
739 nextafter(_Tp __x, _Up __y)
741 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
742 return nextafter(__type(__x), __type(__y));
746 nexttoward(
float __x,
long double __y)
747 {
return __builtin_nexttowardf(__x, __y); }
750 nexttoward(
long double __x,
long double __y)
751 {
return __builtin_nexttowardl(__x, __y); }
753 template<
typename _Tp>
754 inline typename __gnu_cxx::__promote<_Tp>::__type
755 nexttoward(_Tp __x,
long double __y)
757 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
758 return nexttoward(__type(__x), __y);
766 remainder(
float __x,
float __y)
767 {
return __builtin_remainderf(__x, __y); }
770 remainder(
long double __x,
long double __y)
771 {
return __builtin_remainderl(__x, __y); }
773 template<
typename _Tp,
typename _Up>
774 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
775 remainder(_Tp __x, _Up __y)
777 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
778 return remainder(__type(__x), __type(__y));
782 remquo(
float __x,
float __y,
int* __pquo)
783 {
return __builtin_remquof(__x, __y, __pquo); }
786 remquo(
long double __x,
long double __y,
int* __pquo)
787 {
return __builtin_remquol(__x, __y, __pquo); }
789 template<
typename _Tp,
typename _Up>
790 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
791 remquo(_Tp __x, _Up __y,
int* __pquo)
793 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
794 return remquo(__type(__x), __type(__y), __pquo);
799 {
return __builtin_rintf(__x); }
802 rint(
long double __x)
803 {
return __builtin_rintl(__x); }
805 template<
typename _Tp>
806 inline typename __gnu_cxx::__promote<_Tp>::__type
809 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
810 return rint(__type(__x));
815 {
return __builtin_roundf(__x); }
818 round(
long double __x)
819 {
return __builtin_roundl(__x); }
821 template<
typename _Tp>
822 inline typename __gnu_cxx::__promote<_Tp>::__type
825 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
826 return round(__type(__x));
830 scalbln(
float __x,
long __ex)
831 {
return __builtin_scalblnf(__x, __ex); }
834 scalbln(
long double __x,
long __ex)
835 {
return __builtin_scalblnl(__x, __ex); }
837 template<
typename _Tp>
838 inline typename __gnu_cxx::__promote<_Tp>::__type
839 scalbln(_Tp __x,
long __ex)
841 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
842 return scalbln(__type(__x), __ex);
846 scalbn(
float __x,
int __ex)
847 {
return __builtin_scalbnf(__x, __ex); }
850 scalbn(
long double __x,
int __ex)
851 {
return __builtin_scalbnl(__x, __ex); }
853 template<
typename _Tp>
854 inline typename __gnu_cxx::__promote<_Tp>::__type
855 scalbn(_Tp __x,
int __ex)
857 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
858 return scalbn(__type(__x), __ex);
869 {
return __builtin_tgammaf(__x); }
872 tgamma(
long double __x)
873 {
return __builtin_tgammal(__x); }
875 template<
typename _Tp>
876 inline typename __gnu_cxx::__promote<_Tp>::__type
879 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
880 return tgamma(__type(__x));
885 {
return __builtin_truncf(__x); }
888 trunc(
long double __x)
889 {
return __builtin_truncl(__x); }
891 template<
typename _Tp>
892 inline typename __gnu_cxx::__promote<_Tp>::__type
895 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
896 return trunc(__type(__x));
901 _GLIBCXX_END_NAMESPACE_TR1
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
std::complex< _Tp > asinh(const std::complex< _Tp > &)
asinh(__z) [8.1.6].
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
std::complex< _Tp > atanh(const std::complex< _Tp > &)
atanh(__z) [8.1.7].
_Tp fabs(const std::complex< _Tp > &)
fabs(__z) [8.1.8].
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
std::complex< _Tp > acosh(const std::complex< _Tp > &)
acosh(__z) [8.1.5].