150 _GLIBCXX_BEGIN_NAMESPACE_VERSION
152 #if _GLIBCXX_USE_C99_MATH_TR1
301 #if _GLIBCXX_USE_C99_MATH
302 #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
305 template<
typename _Tp>
306 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
310 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
311 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
312 FP_SUBNORMAL, FP_ZERO, __type(__f));
315 template<
typename _Tp>
316 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
320 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
321 return __builtin_isfinite(__type(__f));
324 template<
typename _Tp>
325 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
329 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
330 return __builtin_isinf(__type(__f));
333 template<
typename _Tp>
334 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
338 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
339 return __builtin_isnan(__type(__f));
342 template<
typename _Tp>
343 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
347 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
348 return __builtin_isnormal(__type(__f));
351 template<
typename _Tp>
352 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
356 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
357 return __builtin_signbit(__type(__f));
360 template<
typename _Tp>
361 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
363 isgreater(_Tp __f1, _Tp __f2)
365 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
366 return __builtin_isgreater(__type(__f1), __type(__f2));
369 template<
typename _Tp>
370 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
372 isgreaterequal(_Tp __f1, _Tp __f2)
374 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
375 return __builtin_isgreaterequal(__type(__f1), __type(__f2));
378 template<
typename _Tp>
379 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
381 isless(_Tp __f1, _Tp __f2)
383 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
384 return __builtin_isless(__type(__f1), __type(__f2));
387 template<
typename _Tp>
388 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
390 islessequal(_Tp __f1, _Tp __f2)
392 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
393 return __builtin_islessequal(__type(__f1), __type(__f2));
396 template<
typename _Tp>
397 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
399 islessgreater(_Tp __f1, _Tp __f2)
401 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
402 return __builtin_islessgreater(__type(__f1), __type(__f2));
405 template<
typename _Tp>
406 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
408 isunordered(_Tp __f1, _Tp __f2)
410 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
411 return __builtin_isunordered(__type(__f1), __type(__f2));
417 #if _GLIBCXX_USE_C99_MATH_TR1
424 {
return __builtin_acoshf(__x); }
427 acosh(
long double __x)
428 {
return __builtin_acoshl(__x); }
430 template<
typename _Tp>
431 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
434 {
return __builtin_acosh(__x); }
440 {
return __builtin_asinhf(__x); }
443 asinh(
long double __x)
444 {
return __builtin_asinhl(__x); }
446 template<
typename _Tp>
447 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
450 {
return __builtin_asinh(__x); }
457 {
return __builtin_atanhf(__x); }
460 atanh(
long double __x)
461 {
return __builtin_atanhl(__x); }
463 template<
typename _Tp>
464 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
467 {
return __builtin_atanh(__x); }
471 {
return __builtin_cbrtf(__x); }
474 cbrt(
long double __x)
475 {
return __builtin_cbrtl(__x); }
477 template<
typename _Tp>
478 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
481 {
return __builtin_cbrt(__x); }
486 copysign(
float __x,
float __y)
487 {
return __builtin_copysignf(__x, __y); }
490 copysign(
long double __x,
long double __y)
491 {
return __builtin_copysignl(__x, __y); }
493 template<
typename _Tp,
typename _Up>
494 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
495 copysign(_Tp __x, _Up __y)
497 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
498 return copysign(__type(__x), __type(__y));
506 {
return __builtin_erff(__x); }
510 {
return __builtin_erfl(__x); }
512 template<
typename _Tp>
513 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
516 {
return __builtin_erf(__x); }
520 {
return __builtin_erfcf(__x); }
523 erfc(
long double __x)
524 {
return __builtin_erfcl(__x); }
526 template<
typename _Tp>
527 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
530 {
return __builtin_erfc(__x); }
536 {
return __builtin_exp2f(__x); }