Files
cppdraft_translate/cppdraft/numerics/defns.md
2025-10-25 03:02:53 +03:00

906 B
Raw Blame History

[numerics.defns]

26 Algorithms library [algorithms]

26.10 Generalized numeric operations [numeric.ops]

26.10.2 Definitions [numerics.defns]

1

#

Define GENERALIZED_NONCOMMUTATIVE_SUM(op, a1, …, aN) as follows:

a1 when N is 1, otherwise

op(GENERALIZED_NONCOMMUTATIVE_SUM(op, a1, …, aK),
op(GENERALIZED_NONCOMMUTATIVE_SUM(op, aM, …, aN)) for any K where 1<K+1=M≤N.

2

#

Define GENERALIZED_SUM(op, a1, …, aN) asGENERALIZED_NONCOMMUTATIVE_SUM(op, b1, …, bN),
whereb1, …, bN may be any permutation of a1, …, aN.