1 // <numeric> -*- C++ -*-
3 // Copyright (C) 2001-2026 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/>.
28 * Hewlett-Packard Company
30 * Permission to use, copy, modify, distribute and sell this software
31 * and its documentation for any purpose is hereby granted without fee,
32 * provided that the above copyright notice appear in all copies and
33 * that both that copyright notice and this permission notice appear
34 * in supporting documentation. Hewlett-Packard Company makes no
35 * representations about the suitability of this software for any
36 * purpose. It is provided "as is" without express or implied warranty.
39 * Copyright (c) 1996,1997
40 * Silicon Graphics Computer Systems, Inc.
42 * Permission to use, copy, modify, distribute and sell this software
43 * and its documentation for any purpose is hereby granted without fee,
44 * provided that the above copyright notice appear in all copies and
45 * that both that copyright notice and this permission notice appear
46 * in supporting documentation. Silicon Graphics makes no
47 * representations about the suitability of this software for any
48 * purpose. It is provided "as is" without express or implied warranty.
51 /** @file include/numeric
52 * This is a Standard C++ Library header.
55 #ifndef _GLIBCXX_NUMERIC
56 #define _GLIBCXX_NUMERIC 1
58 #ifdef _GLIBCXX_SYSHDR
59 #pragma GCC system_header
62 #include <bits/c++config.h>
63 #include <bits/stl_iterator_base_funcs.h>
64 #include <bits/stl_numeric.h>
66 #ifdef _GLIBCXX_PARALLEL
67 # include <parallel/numeric>
70 #if __cplusplus >= 201402L
71 # include <type_traits>
73 # include <ext/numeric_traits.h>
76 #if __cplusplus >= 201703L
77 # include <bits/stl_function.h>
80 #if __cplusplus > 201703L
84 #define __glibcxx_want_algorithm_iterator_requirements
85 #define __glibcxx_want_constexpr_numeric
86 #define __glibcxx_want_gcd
87 #define __glibcxx_want_gcd_lcm
88 #define __glibcxx_want_interpolate
89 #define __glibcxx_want_lcm
90 #define __glibcxx_want_parallel_algorithm
91 #define __glibcxx_want_ranges_iota
92 #define __glibcxx_want_saturation_arithmetic
93 #include <bits/version.h>
95 #if __glibcxx_ranges_iota >= 202202L // C++ >= 23
96 # include <bits/ranges_algobase.h> // for ranges::out_value_result
99 #ifdef __glibcxx_saturation_arithmetic // C++ >= 26
100 # include <bits/sat_arith.h>
104 * @defgroup numerics Numerics
106 * Components for performing numeric operations. Includes support for
107 * complex number types, random number generation, numeric (n-at-a-time)
108 * arrays, generalized numeric algorithms, and mathematical special functions.
111 namespace std _GLIBCXX_VISIBILITY(default)
113 _GLIBCXX_BEGIN_NAMESPACE_VERSION
115 #if __cplusplus >= 201402L
118 // Like std::abs, but supports unsigned types and returns the specified type,
119 // so |std::numeric_limits<_Tp>::min()| is OK if representable in _Res.
120 template<typename _Res, typename _Tp>
124 static_assert(sizeof(_Res) >= sizeof(_Tp),
125 "result type must be at least as wide as the input type");
129 #ifdef _GLIBCXX_ASSERTIONS
130 if (!__is_constant_evaluated()) // overflow already detected in constexpr
131 __glibcxx_assert(__val != __gnu_cxx::__int_traits<_Res>::__min);
133 return -static_cast<_Res>(__val);
136 template<typename> void __abs_r(bool) = delete;
138 // GCD implementation, using Stein's algorithm
139 template<typename _Tp>
141 __gcd(_Tp __m, _Tp __n)
143 static_assert(is_unsigned<_Tp>::value, "type must be unsigned");
150 const int __i = std::__countr_zero(__m);
152 const int __j = std::__countr_zero(__n);
154 const int __k = __i < __j ? __i : __j; // min(i, j)
170 __n >>= std::__countr_zero(__n);
173 } // namespace __detail
176 #ifdef __cpp_lib_gcd_lcm // C++ >= 17
177 /// Greatest common divisor
178 template<typename _Mn, typename _Nn>
179 constexpr common_type_t<_Mn, _Nn>
180 gcd(_Mn __m, _Nn __n) noexcept
182 static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>,
183 "std::gcd arguments must be integers");
184 static_assert(_Mn(2) == 2 && _Nn(2) == 2,
185 "std::gcd arguments must not be bool");
186 using _Ct = common_type_t<_Mn, _Nn>;
187 const _Ct __m2 = __detail::__abs_r<_Ct>(__m);
188 const _Ct __n2 = __detail::__abs_r<_Ct>(__n);
189 return __detail::__gcd<make_unsigned_t<_Ct>>(__m2, __n2);
192 /// Least common multiple
193 template<typename _Mn, typename _Nn>
194 constexpr common_type_t<_Mn, _Nn>
195 lcm(_Mn __m, _Nn __n) noexcept
197 static_assert(is_integral_v<_Mn> && is_integral_v<_Nn>,
198 "std::lcm arguments must be integers");
199 static_assert(_Mn(2) == 2 && _Nn(2) == 2,
200 "std::lcm arguments must not be bool");
201 using _Ct = common_type_t<_Mn, _Nn>;
202 const _Ct __m2 = __detail::__abs_r<_Ct>(__m);
203 const _Ct __n2 = __detail::__abs_r<_Ct>(__n);
204 if (__m2 == 0 || __n2 == 0)
206 _Ct __r = __m2 / __detail::__gcd<make_unsigned_t<_Ct>>(__m2, __n2);
208 if constexpr (is_signed_v<_Ct>)
209 if (__is_constant_evaluated())
210 return __r * __n2; // constant evaluation can detect overflow here.
212 bool __overflow = __builtin_mul_overflow(__r, __n2, &__r);
213 __glibcxx_assert(!__overflow);
217 #endif // __cpp_lib_gcd_lcm
220 #ifdef __cpp_lib_interpolate // C++ >= 20
221 template<typename _Tp>
223 enable_if_t<__and_v<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>,
224 __not_<is_same<_Tp, bool>>>,
226 midpoint(_Tp __a, _Tp __b) noexcept
228 if constexpr (is_integral_v<_Tp>)
230 using _Up = make_unsigned_t<_Tp>;
241 return __a + __k * _Tp(_Up(__M - __m) / 2);
245 constexpr _Tp __lo = numeric_limits<_Tp>::min() * 2;
246 constexpr _Tp __hi = numeric_limits<_Tp>::max() / 2;
247 const _Tp __abs_a = __a < 0 ? -__a : __a;
248 const _Tp __abs_b = __b < 0 ? -__b : __b;
249 if (__abs_a <= __hi && __abs_b <= __hi) [[likely]]
250 return (__a + __b) / 2; // always correctly rounded
251 if (__abs_a < __lo) // not safe to halve __a
253 if (__abs_b < __lo) // not safe to halve __b
255 return __a/2 + __b/2; // otherwise correctly rounded
259 template<typename _Tp>
260 constexpr enable_if_t<is_object_v<_Tp>, _Tp*>
261 midpoint(_Tp* __a, _Tp* __b) noexcept
263 static_assert( sizeof(_Tp) != 0, "type must be complete" );
264 return __a + (__b - __a) / 2;
266 #endif // __cpp_lib_interpolate
268 #if __cplusplus >= 201703L
269 /// @addtogroup numeric_ops
273 * @brief Calculate reduction of values in a range.
275 * @param __first Start of range.
276 * @param __last End of range.
277 * @param __init Starting value to add other values to.
278 * @param __binary_op A binary function object.
279 * @return The final sum.
281 * Reduce the values in the range `[first,last)` using a binary operation.
282 * The initial value is `init`. The values are not necessarily processed
285 * This algorithm is similar to `std::accumulate` but is not required to
286 * perform the operations in order from first to last. For operations
287 * that are commutative and associative the result will be the same as
288 * for `std::accumulate`, but for other operations (such as floating point
289 * arithmetic) the result can be different.
291 template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
294 reduce(_InputIterator __first, _InputIterator __last, _Tp __init,
295 _BinaryOperation __binary_op)
297 using __ref = typename iterator_traits<_InputIterator>::reference;
298 static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, _Tp&, __ref>);
299 static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, __ref, _Tp&>);
300 static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, _Tp&, _Tp&>);
301 static_assert(is_invocable_r_v<_Tp, _BinaryOperation&, __ref, __ref>);
302 if constexpr (__is_any_random_access_iter<_InputIterator>::value)
304 while ((__last - __first) >= 4)
306 _Tp __v1 = __binary_op(__first[0], __first[1]);
307 _Tp __v2 = __binary_op(__first[2], __first[3]);
308 _Tp __v3 = __binary_op(__v1, __v2);
309 __init = __binary_op(__init, __v3);
313 for (; __first != __last; ++__first)
314 __init = __binary_op(__init, *__first);
319 * @brief Calculate reduction of values in a range.
321 * @param __first Start of range.
322 * @param __last End of range.
323 * @param __init Starting value to add other values to.
324 * @return The final sum.
326 * Reduce the values in the range `[first,last)` using addition.
327 * Equivalent to calling `std::reduce(first, last, init, std::plus<>())`.
329 template<typename _InputIterator, typename _Tp>
332 reduce(_InputIterator __first, _InputIterator __last, _Tp __init)
333 { return std::reduce(__first, __last, std::move(__init), plus<>()); }
336 * @brief Calculate reduction of values in a range.
338 * @param __first Start of range.
339 * @param __last End of range.
340 * @return The final sum.
342 * Reduce the values in the range `[first,last)` using addition, with
343 * an initial value of `T{}`, where `T` is the iterator's value type.
344 * Equivalent to calling `std::reduce(first, last, T{}, std::plus<>())`.
346 template<typename _InputIterator>
348 inline typename iterator_traits<_InputIterator>::value_type
349 reduce(_InputIterator __first, _InputIterator __last)
351 using value_type = typename iterator_traits<_InputIterator>::value_type;
352 return std::reduce(__first, __last, value_type{}, plus<>());
356 * @brief Combine elements from two ranges and reduce
358 * @param __first1 Start of first range.
359 * @param __last1 End of first range.
360 * @param __first2 Start of second range.
361 * @param __init Starting value to add other values to.
362 * @param __binary_op1 The function used to perform reduction.
363 * @param __binary_op2 The function used to combine values from the ranges.
364 * @return The final sum.
366 * Call `binary_op2(first1[n],first2[n])` for each `n` in `[0,last1-first1)`
367 * and then use `binary_op1` to reduce the values returned by `binary_op2`
368 * to a single value of type `T`.
370 * The range beginning at `first2` must contain at least `last1-first1`
373 template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
374 typename _BinaryOperation1, typename _BinaryOperation2>
377 transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1,
378 _InputIterator2 __first2, _Tp __init,
379 _BinaryOperation1 __binary_op1,
380 _BinaryOperation2 __binary_op2)
382 if constexpr (__and_v<__is_any_random_access_iter<_InputIterator1>,
383 __is_any_random_access_iter<_InputIterator2>>)
385 while ((__last1 - __first1) >= 4)
387 _Tp __v1 = __binary_op1(__binary_op2(__first1[0], __first2[0]),
388 __binary_op2(__first1[1], __first2[1]));
389 _Tp __v2 = __binary_op1(__binary_op2(__first1[2], __first2[2]),
390 __binary_op2(__first1[3], __first2[3]));
391 _Tp __v3 = __binary_op1(__v1, __v2);
392 __init = __binary_op1(__init, __v3);
397 for (; __first1 != __last1; ++__first1, (void) ++__first2)
398 __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
403 * @brief Combine elements from two ranges and reduce
405 * @param __first1 Start of first range.
406 * @param __last1 End of first range.
407 * @param __first2 Start of second range.
408 * @param __init Starting value to add other values to.
409 * @return The final sum.
411 * Call `first1[n]*first2[n]` for each `n` in `[0,last1-first1)` and then
412 * use addition to sum those products to a single value of type `T`.
414 * The range beginning at `first2` must contain at least `last1-first1`
417 template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
420 transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1,
421 _InputIterator2 __first2, _Tp __init)
423 return std::transform_reduce(__first1, __last1, __first2,
425 plus<>(), multiplies<>());
429 * @brief Transform the elements of a range and reduce
431 * @param __first Start of range.
432 * @param __last End of range.
433 * @param __init Starting value to add other values to.
434 * @param __binary_op The function used to perform reduction.
435 * @param __unary_op The function used to transform values from the range.
436 * @return The final sum.
438 * Call `unary_op(first[n])` for each `n` in `[0,last-first)` and then
439 * use `binary_op` to reduce the values returned by `unary_op`
440 * to a single value of type `T`.
442 template<typename _InputIterator, typename _Tp,
443 typename _BinaryOperation, typename _UnaryOperation>
446 transform_reduce(_InputIterator __first, _InputIterator __last, _Tp __init,
447 _BinaryOperation __binary_op, _UnaryOperation __unary_op)
449 if constexpr (__is_any_random_access_iter<_InputIterator>::value)
451 while ((__last - __first) >= 4)
453 _Tp __v1 = __binary_op(__unary_op(__first[0]),
454 __unary_op(__first[1]));
455 _Tp __v2 = __binary_op(__unary_op(__first[2]),
456 __unary_op(__first[3]));
457 _Tp __v3 = __binary_op(__v1, __v2);
458 __init = __binary_op(__init, __v3);
462 for (; __first != __last; ++__first)
463 __init = __binary_op(__init, __unary_op(*__first));
467 /** @brief Output the cumulative sum of one range to a second range
469 * @param __first Start of input range.
470 * @param __last End of input range.
471 * @param __result Start of output range.
472 * @param __init Initial value.
473 * @param __binary_op Function to perform summation.
474 * @return The end of the output range.
476 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
477 * to the output range. Each element of the output range contains the
478 * running total of all earlier elements (and the initial value),
479 * using `binary_op` for summation.
481 * This function generates an "exclusive" scan, meaning the Nth element
482 * of the output range is the sum of the first N-1 input elements,
483 * so the Nth input element is not included.
485 template<typename _InputIterator, typename _OutputIterator, typename _Tp,
486 typename _BinaryOperation>
489 exclusive_scan(_InputIterator __first, _InputIterator __last,
490 _OutputIterator __result, _Tp __init,
491 _BinaryOperation __binary_op)
493 while (__first != __last)
495 _Tp __v = std::move(__init);
496 __init = __binary_op(__v, *__first);
498 *__result++ = std::move(__v);
503 /** @brief Output the cumulative sum of one range to a second range
505 * @param __first Start of input range.
506 * @param __last End of input range.
507 * @param __result Start of output range.
508 * @param __init Initial value.
509 * @return The end of the output range.
511 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
512 * to the output range. Each element of the output range contains the
513 * running total of all earlier elements (and the initial value),
514 * using `std::plus<>` for summation.
516 * This function generates an "exclusive" scan, meaning the Nth element
517 * of the output range is the sum of the first N-1 input elements,
518 * so the Nth input element is not included.
520 template<typename _InputIterator, typename _OutputIterator, typename _Tp>
522 inline _OutputIterator
523 exclusive_scan(_InputIterator __first, _InputIterator __last,
524 _OutputIterator __result, _Tp __init)
526 return std::exclusive_scan(__first, __last, __result, std::move(__init),
530 /** @brief Output the cumulative sum of one range to a second range
532 * @param __first Start of input range.
533 * @param __last End of input range.
534 * @param __result Start of output range.
535 * @param __binary_op Function to perform summation.
536 * @param __init Initial value.
537 * @return The end of the output range.
539 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
540 * to the output range. Each element of the output range contains the
541 * running total of all earlier elements (and the initial value),
542 * using `binary_op` for summation.
544 * This function generates an "inclusive" scan, meaning the Nth element
545 * of the output range is the sum of the first N input elements,
546 * so the Nth input element is included.
548 template<typename _InputIterator, typename _OutputIterator,
549 typename _BinaryOperation, typename _Tp>
552 inclusive_scan(_InputIterator __first, _InputIterator __last,
553 _OutputIterator __result, _BinaryOperation __binary_op,
556 for (; __first != __last; ++__first)
557 *__result++ = __init = __binary_op(__init, *__first);
561 /** @brief Output the cumulative sum of one range to a second range
563 * @param __first Start of input range.
564 * @param __last End of input range.
565 * @param __result Start of output range.
566 * @param __binary_op Function to perform summation.
567 * @return The end of the output range.
569 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
570 * to the output range. Each element of the output range contains the
571 * running total of all earlier elements, using `binary_op` for summation.
573 * This function generates an "inclusive" scan, meaning the Nth element
574 * of the output range is the sum of the first N input elements,
575 * so the Nth input element is included.
577 template<typename _InputIterator, typename _OutputIterator,
578 typename _BinaryOperation>
581 inclusive_scan(_InputIterator __first, _InputIterator __last,
582 _OutputIterator __result, _BinaryOperation __binary_op)
584 if (__first != __last)
586 auto __init = _GLIBCXX_ITER_MOVE(__first);
587 *__result++ = __init;
589 if (__first != __last)
590 __result = std::inclusive_scan(__first, __last, __result,
591 __binary_op, std::move(__init));
596 /** @brief Output the cumulative sum of one range to a second range
598 * @param __first Start of input range.
599 * @param __last End of input range.
600 * @param __result Start of output range.
601 * @return The end of the output range.
603 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
604 * to the output range. Each element of the output range contains the
605 * running total of all earlier elements, using `std::plus<>` for summation.
607 * This function generates an "inclusive" scan, meaning the Nth element
608 * of the output range is the sum of the first N input elements,
609 * so the Nth input element is included.
611 template<typename _InputIterator, typename _OutputIterator>
613 inline _OutputIterator
614 inclusive_scan(_InputIterator __first, _InputIterator __last,
615 _OutputIterator __result)
616 { return std::inclusive_scan(__first, __last, __result, plus<>()); }
618 /** @brief Output the cumulative sum of one range to a second range
620 * @param __first Start of input range.
621 * @param __last End of input range.
622 * @param __result Start of output range.
623 * @param __init Initial value.
624 * @param __binary_op Function to perform summation.
625 * @param __unary_op Function to transform elements of the input range.
626 * @return The end of the output range.
628 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
629 * to the output range. Each element of the output range contains the
630 * running total of all earlier elements (and the initial value),
631 * using `__unary_op` to transform the input elements
632 * and using `__binary_op` for summation.
634 * This function generates an "exclusive" scan, meaning the Nth element
635 * of the output range is the sum of the first N-1 input elements,
636 * so the Nth input element is not included.
638 template<typename _InputIterator, typename _OutputIterator, typename _Tp,
639 typename _BinaryOperation, typename _UnaryOperation>
642 transform_exclusive_scan(_InputIterator __first, _InputIterator __last,
643 _OutputIterator __result, _Tp __init,
644 _BinaryOperation __binary_op,
645 _UnaryOperation __unary_op)
647 while (__first != __last)
649 auto __v = std::move(__init);
650 __init = __binary_op(__v, __unary_op(*__first));
652 *__result++ = std::move(__v);
657 /** @brief Output the cumulative sum of one range to a second range
659 * @param __first Start of input range.
660 * @param __last End of input range.
661 * @param __result Start of output range.
662 * @param __binary_op Function to perform summation.
663 * @param __unary_op Function to transform elements of the input range.
664 * @param __init Initial value.
665 * @return The end of the output range.
667 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
668 * to the output range. Each element of the output range contains the
669 * running total of all earlier elements (and the initial value),
670 * using `__unary_op` to transform the input elements
671 * and using `__binary_op` for summation.
673 * This function generates an "inclusive" scan, meaning the Nth element
674 * of the output range is the sum of the first N input elements,
675 * so the Nth input element is included.
677 template<typename _InputIterator, typename _OutputIterator,
678 typename _BinaryOperation, typename _UnaryOperation, typename _Tp>
681 transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
682 _OutputIterator __result,
683 _BinaryOperation __binary_op,
684 _UnaryOperation __unary_op,
687 for (; __first != __last; ++__first)
688 *__result++ = __init = __binary_op(__init, __unary_op(*__first));
692 /** @brief Output the cumulative sum of one range to a second range
694 * @param __first Start of input range.
695 * @param __last End of input range.
696 * @param __result Start of output range.
697 * @param __binary_op Function to perform summation.
698 * @param __unary_op Function to transform elements of the input range.
699 * @return The end of the output range.
701 * Write the cumulative sum (aka prefix sum, aka scan) of the input range
702 * to the output range. Each element of the output range contains the
703 * running total of all earlier elements,
704 * using `__unary_op` to transform the input elements
705 * and using `__binary_op` for summation.
707 * This function generates an "inclusive" scan, meaning the Nth element
708 * of the output range is the sum of the first N input elements,
709 * so the Nth input element is included.
711 template<typename _InputIterator, typename _OutputIterator,
712 typename _BinaryOperation, typename _UnaryOperation>
715 transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
716 _OutputIterator __result,
717 _BinaryOperation __binary_op,
718 _UnaryOperation __unary_op)
720 if (__first != __last)
722 auto __init = __unary_op(*__first);
723 *__result++ = __init;
725 if (__first != __last)
726 __result = std::transform_inclusive_scan(__first, __last, __result,
727 __binary_op, __unary_op,
733 /// @} group numeric_ops
736 #if __glibcxx_ranges_iota >= 202202L // C++ >= 23
739 template<typename _Out, typename _Tp>
740 using iota_result = out_value_result<_Out, _Tp>;
744 template<input_or_output_iterator _Out, sentinel_for<_Out> _Sent, weakly_incrementable _Tp>
745 requires indirectly_writable<_Out, const _Tp&>
746 constexpr iota_result<_Out, _Tp>
747 operator()(_Out __first, _Sent __last, _Tp __value) const
749 while (__first != __last)
751 *__first = static_cast<const _Tp&>(__value);
755 return {std::move(__first), std::move(__value)};
758 template<weakly_incrementable _Tp, output_range<const _Tp&> _Range>
759 constexpr iota_result<borrowed_iterator_t<_Range>, _Tp>
760 operator()(_Range&& __r, _Tp __value) const
761 { return (*this)(ranges::begin(__r), ranges::end(__r), std::move(__value)); }
764 inline constexpr __iota_fn iota{};
765 } // namespace ranges
766 #endif // __glibcxx_ranges_iota
768 _GLIBCXX_END_NAMESPACE_VERSION
771 #if __cplusplus >= 201703L && _GLIBCXX_HOSTED
772 // Parallel STL algorithms
773 # if _PSTL_EXECUTION_POLICIES_DEFINED
774 // If <execution> has already been included, pull in implementations
775 # include <pstl/glue_numeric_impl.h>
777 // Otherwise just pull in forward declarations
778 # include <pstl/glue_numeric_defs.h>
779 # define _PSTL_NUMERIC_FORWARD_DECLARED 1
783 #endif /* _GLIBCXX_NUMERIC */