Adds x to the internal partial sums. This operation doesn't re-establish special value semantics across iterations (i.e. handling -inf + inf). Preconditions: isFinite(x).
import std.math, std.algorithm, std.range; auto r = iota(1000).map!(n => 1.7L.pow(n+1) - 1.7L.pow(n)); Summator!real s = 0.0; put(s, r); s -= 1.7L.pow(1000); assert(s.sum() == -1);
See Implementation
Adds x to the internal partial sums. This operation doesn't re-establish special value semantics across iterations (i.e. handling -inf + inf). Preconditions: isFinite(x).