code: @Override
      public final OptionalDouble average() {
          /*
           * In the arrays allocated for the collect operation, index 0
           * holds the high-order bits of the running sum, index 1 holds
           * the low-order bits of the sum computed via compensated
           * summation, index 2 holds the number of values seen, index 3
           * holds the simple sum.
           */
          double[] avg = collect(() -> new double[4],
                                 (ll, d) -> {
                                     ll[2]++;
                                     Collectors.sumWithCompensation(ll, d);
                                     ll[3] += d;
                                 },
                                 (ll, rr) -> {
                                     Collectors.sumWithCompensation(ll, rr[0]);
                                     Collectors.sumWithCompensation(ll, rr[1]);
                                     ll[2] += rr[2];
                                     ll[3] += rr[3];
                                 });
          return avg[2] > 0
              ? OptionalDouble.of(Collectors.computeFinalSum(avg) / avg[2])
              : OptionalDouble.empty();
      }
docs: {@inheritDoc}
  
  @implNote The {@code double} format can represent all
  consecutive integers in the range -2<sup>53</sup> to
  2<sup>53</sup>. If the pipeline has more than 2<sup>53</sup>
  values, the divisor in the average computation will saturate at
  2<sup>53</sup>, leading to additional numerical errors.