docs: public double set(long index, double value) {
          compact();
          int i = findIndexMatching(index);
          if(i < 0) {
              add(index, value);
              compacted = false;
              return 0;
          } else {
              double old = vals[i];
              vals[i] = value;
              return old;
          }
      }