26#ifndef _STLP_NUMERIC_C
27#define _STLP_NUMERIC_C
29#ifndef _STLP_INTERNAL_NUMERIC_H
37template <
class _InputIterator,
class _OutputIterator,
class _Tp,
38 class _BinaryOperation>
41 _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) {
43 if (__first ==
__last)
return __result;
47 while (++__first !=
__last) {
54template <
class _InputIterator,
class _OutputIterator,
class _Tp,
55 class _BinaryOperation>
58 _OutputIterator __result, _Tp*,
59 _BinaryOperation __binary_op) {
61 if (__first ==
__last)
return __result;
64 while (++__first !=
__last) {
66 *++__result = __binary_op(__tmp,
__val);
73template <
class _Tp,
class _Integer,
class _Mono
idOperation>
74_Tp
__power(_Tp __x, _Integer
__n, _MonoidOperation __opr) {
79 while ((
__n & 1) == 0) {
81 __x = __opr(__x, __x);
87 __x = __opr(__x, __x);
89 __result = __opr(__result, __x);
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_MPWFIX_CATCH
#define _STLP_MPWFIX_CATCH_ACTION(action)
#define _STLP_DEBUG_CHECK(expr)
_Tp __identity_element(plus< _Tp >)
_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr)
_OutputIterator __adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op)
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE _OutputIterator __partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op)
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE