Lines Matching refs:sum
42 * {@code double} sum. When updates (method {@link #add}) are
44 * to reduce contention. Method {@link #sum} (or, equivalently {@link
46 * variables maintaining the sum. The order of accumulation within or
79 * Creates a new adder with initial sum of zero.
106 * Returns the current sum. The returned value is <em>NOT</em> an
109 * occur while the sum is being calculated might not be
115 * @return the sum
117 public double sum() {
119 double sum = Double.longBitsToDouble(base);
123 sum += Double.longBitsToDouble(a.value);
125 return sum;
129 * Resets variables maintaining the sum to zero. This method may
146 * Equivalent in effect to {@link #sum} followed by {@link
153 * @return the sum
157 double sum = Double.longBitsToDouble(base);
164 sum += Double.longBitsToDouble(v);
168 return sum;
172 * Returns the String representation of the {@link #sum}.
173 * @return the String representation of the {@link #sum}
176 return Double.toString(sum());
180 * Equivalent to {@link #sum}.
182 * @return the sum
185 return sum();
189 * Returns the {@link #sum} as a {@code long} after a
193 return (long)sum();
197 * Returns the {@link #sum} as an {@code int} after a
201 return (int)sum();
205 * Returns the {@link #sum} as a {@code float}
209 return (float)sum();
221 * The current value returned by sum().
227 value = a.sum();