1 // -*- C++ -*- C forwarding header.
3 // Copyright (C) 1997-2017 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 /** @file include/cmath
26 * This is a Standard C++ Library file. You should @c \#include this file
27 * in your programs, rather than any of the @a *.h implementation files.
29 * This is the C++ version of the Standard C Library header @c math.h,
30 * and its contents are (mostly) the same as that header, but are all
31 * contained in the namespace @c std (except for names which are defined
36 // ISO C++ 14882: 26.5 C library
39 #pragma GCC system_header
41 #include <bits/c++config.h>
42 #include <bits/cpp_type_traits.h>
43 #include <ext/type_traits.h>
44 #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
45 #include_next <math.h>
46 #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
47 #include <bits/std_abs.h>
49 #ifndef _GLIBCXX_CMATH
50 #define _GLIBCXX_CMATH 1
52 // Get rid of those macros defined in <math.h> in lieu of real functions.
79 namespace std _GLIBCXX_VISIBILITY(default)
81 _GLIBCXX_BEGIN_NAMESPACE_VERSION
85 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
86 inline _GLIBCXX_CONSTEXPR float
88 { return __builtin_acosf(__x); }
90 inline _GLIBCXX_CONSTEXPR long double
92 { return __builtin_acosl(__x); }
95 template<typename _Tp>
96 inline _GLIBCXX_CONSTEXPR
97 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
100 { return __builtin_acos(__x); }
104 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
105 inline _GLIBCXX_CONSTEXPR float
107 { return __builtin_asinf(__x); }
109 inline _GLIBCXX_CONSTEXPR long double
110 asin(long double __x)
111 { return __builtin_asinl(__x); }
114 template<typename _Tp>
115 inline _GLIBCXX_CONSTEXPR
116 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
119 { return __builtin_asin(__x); }
123 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
124 inline _GLIBCXX_CONSTEXPR float
126 { return __builtin_atanf(__x); }
128 inline _GLIBCXX_CONSTEXPR long double
129 atan(long double __x)
130 { return __builtin_atanl(__x); }
133 template<typename _Tp>
134 inline _GLIBCXX_CONSTEXPR
135 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
138 { return __builtin_atan(__x); }
142 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
143 inline _GLIBCXX_CONSTEXPR float
144 atan2(float __y, float __x)
145 { return __builtin_atan2f(__y, __x); }
147 inline _GLIBCXX_CONSTEXPR long double
148 atan2(long double __y, long double __x)
149 { return __builtin_atan2l(__y, __x); }
152 template<typename _Tp, typename _Up>
153 inline _GLIBCXX_CONSTEXPR
154 typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
155 atan2(_Tp __y, _Up __x)
157 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
158 return atan2(__type(__y), __type(__x));
163 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
164 inline _GLIBCXX_CONSTEXPR float
166 { return __builtin_ceilf(__x); }
168 inline _GLIBCXX_CONSTEXPR long double
169 ceil(long double __x)
170 { return __builtin_ceill(__x); }
173 template<typename _Tp>
174 inline _GLIBCXX_CONSTEXPR
175 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
178 { return __builtin_ceil(__x); }
182 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
183 inline _GLIBCXX_CONSTEXPR float
185 { return __builtin_cosf(__x); }
187 inline _GLIBCXX_CONSTEXPR long double
189 { return __builtin_cosl(__x); }
192 template<typename _Tp>
193 inline _GLIBCXX_CONSTEXPR
194 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
197 { return __builtin_cos(__x); }
201 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
202 inline _GLIBCXX_CONSTEXPR float
204 { return __builtin_coshf(__x); }
206 inline _GLIBCXX_CONSTEXPR long double
207 cosh(long double __x)
208 { return __builtin_coshl(__x); }
211 template<typename _Tp>
212 inline _GLIBCXX_CONSTEXPR
213 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
216 { return __builtin_cosh(__x); }
220 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
221 inline _GLIBCXX_CONSTEXPR float
223 { return __builtin_expf(__x); }
225 inline _GLIBCXX_CONSTEXPR long double
227 { return __builtin_expl(__x); }
230 template<typename _Tp>
231 inline _GLIBCXX_CONSTEXPR
232 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
235 { return __builtin_exp(__x); }
239 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
240 inline _GLIBCXX_CONSTEXPR float
242 { return __builtin_fabsf(__x); }
244 inline _GLIBCXX_CONSTEXPR long double
245 fabs(long double __x)
246 { return __builtin_fabsl(__x); }
249 template<typename _Tp>
250 inline _GLIBCXX_CONSTEXPR
251 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
254 { return __builtin_fabs(__x); }
258 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
259 inline _GLIBCXX_CONSTEXPR float
261 { return __builtin_floorf(__x); }
263 inline _GLIBCXX_CONSTEXPR long double
264 floor(long double __x)
265 { return __builtin_floorl(__x); }
268 template<typename _Tp>
269 inline _GLIBCXX_CONSTEXPR
270 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
273 { return __builtin_floor(__x); }
277 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
278 inline _GLIBCXX_CONSTEXPR float
279 fmod(float __x, float __y)
280 { return __builtin_fmodf(__x, __y); }
282 inline _GLIBCXX_CONSTEXPR long double
283 fmod(long double __x, long double __y)
284 { return __builtin_fmodl(__x, __y); }
287 template<typename _Tp, typename _Up>
288 inline _GLIBCXX_CONSTEXPR
289 typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
290 fmod(_Tp __x, _Up __y)
292 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
293 return fmod(__type(__x), __type(__y));
298 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
300 frexp(float __x, int* __exp)
301 { return __builtin_frexpf(__x, __exp); }
304 frexp(long double __x, int* __exp)
305 { return __builtin_frexpl(__x, __exp); }
308 template<typename _Tp>
309 inline _GLIBCXX_CONSTEXPR
310 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
312 frexp(_Tp __x, int* __exp)
313 { return __builtin_frexp(__x, __exp); }
317 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
318 inline _GLIBCXX_CONSTEXPR float
319 ldexp(float __x, int __exp)
320 { return __builtin_ldexpf(__x, __exp); }
322 inline _GLIBCXX_CONSTEXPR long double
323 ldexp(long double __x, int __exp)
324 { return __builtin_ldexpl(__x, __exp); }
327 template<typename _Tp>
328 inline _GLIBCXX_CONSTEXPR
329 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
331 ldexp(_Tp __x, int __exp)
332 { return __builtin_ldexp(__x, __exp); }
336 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
337 inline _GLIBCXX_CONSTEXPR float
339 { return __builtin_logf(__x); }
341 inline _GLIBCXX_CONSTEXPR long double
343 { return __builtin_logl(__x); }
346 template<typename _Tp>
347 inline _GLIBCXX_CONSTEXPR
348 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
351 { return __builtin_log(__x); }
355 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
356 inline _GLIBCXX_CONSTEXPR float
358 { return __builtin_log10f(__x); }
360 inline _GLIBCXX_CONSTEXPR long double
361 log10(long double __x)
362 { return __builtin_log10l(__x); }
365 template<typename _Tp>
366 inline _GLIBCXX_CONSTEXPR
367 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
370 { return __builtin_log10(__x); }
374 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
376 modf(float __x, float* __iptr)
377 { return __builtin_modff(__x, __iptr); }
380 modf(long double __x, long double* __iptr)
381 { return __builtin_modfl(__x, __iptr); }
386 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
387 inline _GLIBCXX_CONSTEXPR float
388 pow(float __x, float __y)
389 { return __builtin_powf(__x, __y); }
391 inline _GLIBCXX_CONSTEXPR long double
392 pow(long double __x, long double __y)
393 { return __builtin_powl(__x, __y); }
395 #if __cplusplus < 201103L
396 // _GLIBCXX_RESOLVE_LIB_DEFECTS
397 // DR 550. What should the return type of pow(float,int) be?
399 pow(double __x, int __i)
400 { return __builtin_powi(__x, __i); }
403 pow(float __x, int __n)
404 { return __builtin_powif(__x, __n); }
407 pow(long double __x, int __n)
408 { return __builtin_powil(__x, __n); }
412 template<typename _Tp, typename _Up>
413 inline _GLIBCXX_CONSTEXPR
414 typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
415 pow(_Tp __x, _Up __y)
417 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
418 return pow(__type(__x), __type(__y));
423 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
424 inline _GLIBCXX_CONSTEXPR float
426 { return __builtin_sinf(__x); }
428 inline _GLIBCXX_CONSTEXPR long double
430 { return __builtin_sinl(__x); }
433 template<typename _Tp>
434 inline _GLIBCXX_CONSTEXPR
435 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
438 { return __builtin_sin(__x); }
442 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
443 inline _GLIBCXX_CONSTEXPR float
445 { return __builtin_sinhf(__x); }
447 inline _GLIBCXX_CONSTEXPR long double
448 sinh(long double __x)
449 { return __builtin_sinhl(__x); }
452 template<typename _Tp>
453 inline _GLIBCXX_CONSTEXPR
454 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
457 { return __builtin_sinh(__x); }
461 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
462 inline _GLIBCXX_CONSTEXPR float
464 { return __builtin_sqrtf(__x); }
466 inline _GLIBCXX_CONSTEXPR long double
467 sqrt(long double __x)
468 { return __builtin_sqrtl(__x); }
471 template<typename _Tp>
472 inline _GLIBCXX_CONSTEXPR
473 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
476 { return __builtin_sqrt(__x); }
480 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
481 inline _GLIBCXX_CONSTEXPR float
483 { return __builtin_tanf(__x); }
485 inline _GLIBCXX_CONSTEXPR long double
487 { return __builtin_tanl(__x); }
490 template<typename _Tp>
491 inline _GLIBCXX_CONSTEXPR
492 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
495 { return __builtin_tan(__x); }
499 #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
500 inline _GLIBCXX_CONSTEXPR float
502 { return __builtin_tanhf(__x); }
504 inline _GLIBCXX_CONSTEXPR long double
505 tanh(long double __x)
506 { return __builtin_tanhl(__x); }
509 template<typename _Tp>
510 inline _GLIBCXX_CONSTEXPR
511 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
514 { return __builtin_tanh(__x); }
516 _GLIBCXX_END_NAMESPACE_VERSION
519 #if _GLIBCXX_USE_C99_MATH
520 #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
522 // These are possible macros imported from C99-land.
530 #undef isgreaterequal
536 namespace std _GLIBCXX_VISIBILITY(default)
538 _GLIBCXX_BEGIN_NAMESPACE_VERSION
540 #if __cplusplus >= 201103L
542 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
544 fpclassify(float __x)
545 { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
546 FP_SUBNORMAL, FP_ZERO, __x); }
549 fpclassify(double __x)
550 { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
551 FP_SUBNORMAL, FP_ZERO, __x); }
554 fpclassify(long double __x)
555 { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
556 FP_SUBNORMAL, FP_ZERO, __x); }
559 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
560 template<typename _Tp>
561 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
564 { return __x != 0 ? FP_NORMAL : FP_ZERO; }
567 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
570 { return __builtin_isfinite(__x); }
574 { return __builtin_isfinite(__x); }
577 isfinite(long double __x)
578 { return __builtin_isfinite(__x); }
581 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
582 template<typename _Tp>
583 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
589 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
592 { return __builtin_isinf(__x); }
594 #if _GLIBCXX_HAVE_OBSOLETE_ISINF \
595 && !_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC
600 { return __builtin_isinf(__x); }
604 isinf(long double __x)
605 { return __builtin_isinf(__x); }
608 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
609 template<typename _Tp>
610 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
616 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
619 { return __builtin_isnan(__x); }
621 #if _GLIBCXX_HAVE_OBSOLETE_ISNAN \
622 && !_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC
627 { return __builtin_isnan(__x); }
631 isnan(long double __x)
632 { return __builtin_isnan(__x); }
635 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
636 template<typename _Tp>
637 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
643 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
646 { return __builtin_isnormal(__x); }
650 { return __builtin_isnormal(__x); }
653 isnormal(long double __x)
654 { return __builtin_isnormal(__x); }
657 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
658 template<typename _Tp>
659 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
662 { return __x != 0 ? true : false; }
665 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
666 // Note: middle-end/36757 is fixed, __builtin_signbit is type-generic.
669 { return __builtin_signbit(__x); }
673 { return __builtin_signbit(__x); }
676 signbit(long double __x)
677 { return __builtin_signbit(__x); }
680 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
681 template<typename _Tp>
682 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
685 { return __x < 0 ? true : false; }
688 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
690 isgreater(float __x, float __y)
691 { return __builtin_isgreater(__x, __y); }
694 isgreater(double __x, double __y)
695 { return __builtin_isgreater(__x, __y); }
698 isgreater(long double __x, long double __y)
699 { return __builtin_isgreater(__x, __y); }
702 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
703 template<typename _Tp, typename _Up>
705 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
706 && __is_arithmetic<_Up>::__value), bool>::__type
707 isgreater(_Tp __x, _Up __y)
709 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
710 return __builtin_isgreater(__type(__x), __type(__y));
714 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
716 isgreaterequal(float __x, float __y)
717 { return __builtin_isgreaterequal(__x, __y); }
720 isgreaterequal(double __x, double __y)
721 { return __builtin_isgreaterequal(__x, __y); }
724 isgreaterequal(long double __x, long double __y)
725 { return __builtin_isgreaterequal(__x, __y); }
728 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
729 template<typename _Tp, typename _Up>
731 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
732 && __is_arithmetic<_Up>::__value), bool>::__type
733 isgreaterequal(_Tp __x, _Up __y)
735 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
736 return __builtin_isgreaterequal(__type(__x), __type(__y));
740 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
742 isless(float __x, float __y)
743 { return __builtin_isless(__x, __y); }
746 isless(double __x, double __y)
747 { return __builtin_isless(__x, __y); }
750 isless(long double __x, long double __y)
751 { return __builtin_isless(__x, __y); }
754 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
755 template<typename _Tp, typename _Up>
757 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
758 && __is_arithmetic<_Up>::__value), bool>::__type
759 isless(_Tp __x, _Up __y)
761 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
762 return __builtin_isless(__type(__x), __type(__y));
766 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
768 islessequal(float __x, float __y)
769 { return __builtin_islessequal(__x, __y); }
772 islessequal(double __x, double __y)
773 { return __builtin_islessequal(__x, __y); }
776 islessequal(long double __x, long double __y)
777 { return __builtin_islessequal(__x, __y); }
780 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
781 template<typename _Tp, typename _Up>
783 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
784 && __is_arithmetic<_Up>::__value), bool>::__type
785 islessequal(_Tp __x, _Up __y)
787 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
788 return __builtin_islessequal(__type(__x), __type(__y));
792 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
794 islessgreater(float __x, float __y)
795 { return __builtin_islessgreater(__x, __y); }
798 islessgreater(double __x, double __y)
799 { return __builtin_islessgreater(__x, __y); }
802 islessgreater(long double __x, long double __y)
803 { return __builtin_islessgreater(__x, __y); }
806 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
807 template<typename _Tp, typename _Up>
809 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
810 && __is_arithmetic<_Up>::__value), bool>::__type
811 islessgreater(_Tp __x, _Up __y)
813 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
814 return __builtin_islessgreater(__type(__x), __type(__y));
818 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
820 isunordered(float __x, float __y)
821 { return __builtin_isunordered(__x, __y); }
824 isunordered(double __x, double __y)
825 { return __builtin_isunordered(__x, __y); }
828 isunordered(long double __x, long double __y)
829 { return __builtin_isunordered(__x, __y); }
832 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
833 template<typename _Tp, typename _Up>
835 __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value
836 && __is_arithmetic<_Up>::__value), bool>::__type
837 isunordered(_Tp __x, _Up __y)
839 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
840 return __builtin_isunordered(__type(__x), __type(__y));
846 template<typename _Tp>
847 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
851 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
852 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
853 FP_SUBNORMAL, FP_ZERO, __type(__f));
856 template<typename _Tp>
857 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
861 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
862 return __builtin_isfinite(__type(__f));
865 template<typename _Tp>
866 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
870 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
871 return __builtin_isinf(__type(__f));
874 template<typename _Tp>
875 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
879 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
880 return __builtin_isnan(__type(__f));
883 template<typename _Tp>
884 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
888 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
889 return __builtin_isnormal(__type(__f));
892 template<typename _Tp>
893 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
897 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
898 return __builtin_signbit(__type(__f));
901 template<typename _Tp>
902 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
904 isgreater(_Tp __f1, _Tp __f2)
906 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
907 return __builtin_isgreater(__type(__f1), __type(__f2));
910 template<typename _Tp>
911 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
913 isgreaterequal(_Tp __f1, _Tp __f2)
915 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
916 return __builtin_isgreaterequal(__type(__f1), __type(__f2));
919 template<typename _Tp>
920 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
922 isless(_Tp __f1, _Tp __f2)
924 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
925 return __builtin_isless(__type(__f1), __type(__f2));
928 template<typename _Tp>
929 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
931 islessequal(_Tp __f1, _Tp __f2)
933 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
934 return __builtin_islessequal(__type(__f1), __type(__f2));
937 template<typename _Tp>
938 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
940 islessgreater(_Tp __f1, _Tp __f2)
942 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
943 return __builtin_islessgreater(__type(__f1), __type(__f2));
946 template<typename _Tp>
947 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
949 isunordered(_Tp __f1, _Tp __f2)
951 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
952 return __builtin_isunordered(__type(__f1), __type(__f2));
957 _GLIBCXX_END_NAMESPACE_VERSION
960 #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
963 #if __cplusplus >= 201103L
965 #ifdef _GLIBCXX_USE_C99_MATH_TR1
1015 #ifndef _GLIBCXX_NO_C99_ROUNDING_FUNCS
1075 namespace std _GLIBCXX_VISIBILITY(default)
1077 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1148 #ifndef _GLIBCXX_NO_C99_ROUNDING_FUNCS
1191 using ::nexttowardf;
1192 using ::nexttowardl;
1226 /// Additional overloads.
1227 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1230 { return __builtin_acoshf(__x); }
1232 constexpr long double
1233 acosh(long double __x)
1234 { return __builtin_acoshl(__x); }
1237 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1238 template<typename _Tp>
1239 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1242 { return __builtin_acosh(__x); }
1245 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1248 { return __builtin_asinhf(__x); }
1250 constexpr long double
1251 asinh(long double __x)
1252 { return __builtin_asinhl(__x); }
1255 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1256 template<typename _Tp>
1257 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1260 { return __builtin_asinh(__x); }
1263 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1266 { return __builtin_atanhf(__x); }
1268 constexpr long double
1269 atanh(long double __x)
1270 { return __builtin_atanhl(__x); }
1273 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1274 template<typename _Tp>
1275 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1278 { return __builtin_atanh(__x); }
1281 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1284 { return __builtin_cbrtf(__x); }
1286 constexpr long double
1287 cbrt(long double __x)
1288 { return __builtin_cbrtl(__x); }
1291 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1292 template<typename _Tp>
1293 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1296 { return __builtin_cbrt(__x); }
1299 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1301 copysign(float __x, float __y)
1302 { return __builtin_copysignf(__x, __y); }
1304 constexpr long double
1305 copysign(long double __x, long double __y)
1306 { return __builtin_copysignl(__x, __y); }
1309 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1310 template<typename _Tp, typename _Up>
1311 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1312 copysign(_Tp __x, _Up __y)
1314 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1315 return copysign(__type(__x), __type(__y));
1319 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1322 { return __builtin_erff(__x); }
1324 constexpr long double
1325 erf(long double __x)
1326 { return __builtin_erfl(__x); }
1329 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1330 template<typename _Tp>
1331 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1334 { return __builtin_erf(__x); }
1337 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1340 { return __builtin_erfcf(__x); }
1342 constexpr long double
1343 erfc(long double __x)
1344 { return __builtin_erfcl(__x); }
1347 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1348 template<typename _Tp>
1349 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1352 { return __builtin_erfc(__x); }
1355 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1358 { return __builtin_exp2f(__x); }
1360 constexpr long double
1361 exp2(long double __x)
1362 { return __builtin_exp2l(__x); }
1365 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1366 template<typename _Tp>
1367 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1370 { return __builtin_exp2(__x); }
1373 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1376 { return __builtin_expm1f(__x); }
1378 constexpr long double
1379 expm1(long double __x)
1380 { return __builtin_expm1l(__x); }
1383 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1384 template<typename _Tp>
1385 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1388 { return __builtin_expm1(__x); }
1391 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1393 fdim(float __x, float __y)
1394 { return __builtin_fdimf(__x, __y); }
1396 constexpr long double
1397 fdim(long double __x, long double __y)
1398 { return __builtin_fdiml(__x, __y); }
1401 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1402 template<typename _Tp, typename _Up>
1403 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1404 fdim(_Tp __x, _Up __y)
1406 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1407 return fdim(__type(__x), __type(__y));
1411 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1413 fma(float __x, float __y, float __z)
1414 { return __builtin_fmaf(__x, __y, __z); }
1416 constexpr long double
1417 fma(long double __x, long double __y, long double __z)
1418 { return __builtin_fmal(__x, __y, __z); }
1421 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1422 template<typename _Tp, typename _Up, typename _Vp>
1423 constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
1424 fma(_Tp __x, _Up __y, _Vp __z)
1426 typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
1427 return fma(__type(__x), __type(__y), __type(__z));
1431 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1433 fmax(float __x, float __y)
1434 { return __builtin_fmaxf(__x, __y); }
1436 constexpr long double
1437 fmax(long double __x, long double __y)
1438 { return __builtin_fmaxl(__x, __y); }
1441 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1442 template<typename _Tp, typename _Up>
1443 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1444 fmax(_Tp __x, _Up __y)
1446 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1447 return fmax(__type(__x), __type(__y));
1451 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1453 fmin(float __x, float __y)
1454 { return __builtin_fminf(__x, __y); }
1456 constexpr long double
1457 fmin(long double __x, long double __y)
1458 { return __builtin_fminl(__x, __y); }
1461 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1462 template<typename _Tp, typename _Up>
1463 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1464 fmin(_Tp __x, _Up __y)
1466 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1467 return fmin(__type(__x), __type(__y));
1471 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1473 hypot(float __x, float __y)
1474 { return __builtin_hypotf(__x, __y); }
1476 constexpr long double
1477 hypot(long double __x, long double __y)
1478 { return __builtin_hypotl(__x, __y); }
1481 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1482 template<typename _Tp, typename _Up>
1483 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1484 hypot(_Tp __x, _Up __y)
1486 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1487 return hypot(__type(__x), __type(__y));
1491 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1494 { return __builtin_ilogbf(__x); }
1497 ilogb(long double __x)
1498 { return __builtin_ilogbl(__x); }
1501 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1502 template<typename _Tp>
1504 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1507 { return __builtin_ilogb(__x); }
1510 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1513 { return __builtin_lgammaf(__x); }
1515 constexpr long double
1516 lgamma(long double __x)
1517 { return __builtin_lgammal(__x); }
1520 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1521 template<typename _Tp>
1522 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1525 { return __builtin_lgamma(__x); }
1528 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1531 { return __builtin_llrintf(__x); }
1534 llrint(long double __x)
1535 { return __builtin_llrintl(__x); }
1538 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1539 template<typename _Tp>
1540 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1543 { return __builtin_llrint(__x); }
1546 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1549 { return __builtin_llroundf(__x); }
1552 llround(long double __x)
1553 { return __builtin_llroundl(__x); }
1556 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1557 template<typename _Tp>
1558 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1561 { return __builtin_llround(__x); }
1564 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1567 { return __builtin_log1pf(__x); }
1569 constexpr long double
1570 log1p(long double __x)
1571 { return __builtin_log1pl(__x); }
1574 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1575 template<typename _Tp>
1576 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1579 { return __builtin_log1p(__x); }
1582 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1586 { return __builtin_log2f(__x); }
1588 constexpr long double
1589 log2(long double __x)
1590 { return __builtin_log2l(__x); }
1593 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1594 template<typename _Tp>
1595 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1598 { return __builtin_log2(__x); }
1601 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1604 { return __builtin_logbf(__x); }
1606 constexpr long double
1607 logb(long double __x)
1608 { return __builtin_logbl(__x); }
1611 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1612 template<typename _Tp>
1613 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1616 { return __builtin_logb(__x); }
1619 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1622 { return __builtin_lrintf(__x); }
1625 lrint(long double __x)
1626 { return __builtin_lrintl(__x); }
1629 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1630 template<typename _Tp>
1631 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1634 { return __builtin_lrint(__x); }
1637 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1640 { return __builtin_lroundf(__x); }
1643 lround(long double __x)
1644 { return __builtin_lroundl(__x); }
1647 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1648 template<typename _Tp>
1649 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1652 { return __builtin_lround(__x); }
1655 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1657 nearbyint(float __x)
1658 { return __builtin_nearbyintf(__x); }
1660 constexpr long double
1661 nearbyint(long double __x)
1662 { return __builtin_nearbyintl(__x); }
1665 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1666 template<typename _Tp>
1667 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1670 { return __builtin_nearbyint(__x); }
1673 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1675 nextafter(float __x, float __y)
1676 { return __builtin_nextafterf(__x, __y); }
1678 constexpr long double
1679 nextafter(long double __x, long double __y)
1680 { return __builtin_nextafterl(__x, __y); }
1683 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1684 template<typename _Tp, typename _Up>
1685 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1686 nextafter(_Tp __x, _Up __y)
1688 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1689 return nextafter(__type(__x), __type(__y));
1693 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1695 nexttoward(float __x, long double __y)
1696 { return __builtin_nexttowardf(__x, __y); }
1698 constexpr long double
1699 nexttoward(long double __x, long double __y)
1700 { return __builtin_nexttowardl(__x, __y); }
1703 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1704 template<typename _Tp>
1705 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1707 nexttoward(_Tp __x, long double __y)
1708 { return __builtin_nexttoward(__x, __y); }
1711 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1713 remainder(float __x, float __y)
1714 { return __builtin_remainderf(__x, __y); }
1716 constexpr long double
1717 remainder(long double __x, long double __y)
1718 { return __builtin_remainderl(__x, __y); }
1721 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1722 template<typename _Tp, typename _Up>
1723 constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1724 remainder(_Tp __x, _Up __y)
1726 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1727 return remainder(__type(__x), __type(__y));
1731 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1733 remquo(float __x, float __y, int* __pquo)
1734 { return __builtin_remquof(__x, __y, __pquo); }
1737 remquo(long double __x, long double __y, int* __pquo)
1738 { return __builtin_remquol(__x, __y, __pquo); }
1741 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1742 template<typename _Tp, typename _Up>
1743 inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
1744 remquo(_Tp __x, _Up __y, int* __pquo)
1746 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1747 return remquo(__type(__x), __type(__y), __pquo);
1751 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1754 { return __builtin_rintf(__x); }
1756 constexpr long double
1757 rint(long double __x)
1758 { return __builtin_rintl(__x); }
1761 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1762 template<typename _Tp>
1763 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1766 { return __builtin_rint(__x); }
1769 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1772 { return __builtin_roundf(__x); }
1774 constexpr long double
1775 round(long double __x)
1776 { return __builtin_roundl(__x); }
1779 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1780 template<typename _Tp>
1781 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1784 { return __builtin_round(__x); }
1787 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1789 scalbln(float __x, long __ex)
1790 { return __builtin_scalblnf(__x, __ex); }
1792 constexpr long double
1793 scalbln(long double __x, long __ex)
1794 { return __builtin_scalblnl(__x, __ex); }
1797 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1798 template<typename _Tp>
1799 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1801 scalbln(_Tp __x, long __ex)
1802 { return __builtin_scalbln(__x, __ex); }
1805 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1807 scalbn(float __x, int __ex)
1808 { return __builtin_scalbnf(__x, __ex); }
1810 constexpr long double
1811 scalbn(long double __x, int __ex)
1812 { return __builtin_scalbnl(__x, __ex); }
1815 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1816 template<typename _Tp>
1817 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1819 scalbn(_Tp __x, int __ex)
1820 { return __builtin_scalbn(__x, __ex); }
1823 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1826 { return __builtin_tgammaf(__x); }
1828 constexpr long double
1829 tgamma(long double __x)
1830 { return __builtin_tgammal(__x); }
1833 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1834 template<typename _Tp>
1835 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1838 { return __builtin_tgamma(__x); }
1841 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
1844 { return __builtin_truncf(__x); }
1846 constexpr long double
1847 trunc(long double __x)
1848 { return __builtin_truncl(__x); }
1851 #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
1852 template<typename _Tp>
1853 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1856 { return __builtin_trunc(__x); }
1859 _GLIBCXX_END_NAMESPACE_VERSION
1862 #endif // _GLIBCXX_USE_C99_MATH_TR1
1866 #if __cplusplus > 201402L
1867 namespace std _GLIBCXX_VISIBILITY(default)
1869 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1871 // [c.math.hypot3], three-dimensional hypotenuse
1872 #define __cpp_lib_hypot 201603
1874 template<typename _Tp>
1876 __hypot3(_Tp __x, _Tp __y, _Tp __z)
1878 __x = std::abs(__x);
1879 __y = std::abs(__y);
1880 __z = std::abs(__z);
1881 if (_Tp __a = __x < __y ? __y < __z ? __z : __y : __x < __z ? __z : __x)
1882 return __a * std::sqrt((__x / __a) * (__x / __a)
1883 + (__y / __a) * (__y / __a)
1884 + (__z / __a) * (__z / __a));
1890 hypot(float __x, float __y, float __z)
1891 { return std::__hypot3<float>(__x, __y, __z); }
1894 hypot(double __x, double __y, double __z)
1895 { return std::__hypot3<double>(__x, __y, __z); }
1898 hypot(long double __x, long double __y, long double __z)
1899 { return std::__hypot3<long double>(__x, __y, __z); }
1901 template<typename _Tp, typename _Up, typename _Vp>
1902 typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
1903 hypot(_Tp __x, _Up __y, _Vp __z)
1905 using __type = typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type;
1906 return std::__hypot3<__type>(__x, __y, __z);
1908 _GLIBCXX_END_NAMESPACE_VERSION
1913 #if _GLIBCXX_USE_STD_SPEC_FUNCS
1914 # include <bits/specfun.h>