selfAdd method

DD selfAdd(
  1. double y
)

Adds the argument to the value of this. To prevent altering constants, this method must only be used on values known to be newly created.

@param y the addend @return this object, increased by y

Implementation

DD selfAdd(double y) {
  double H, h, S, s, e, f;
  S = hi + y;
  e = S - hi;
  s = S - e;
  s = (y - e) + (hi - s);
  f = s + lo;
  H = S + f;
  h = f + (S - H);
  hi = H + h;
  lo = h + (H - hi);
  return this;
// return selfAdd(y, 0.0);
}