code: public double set(int index, double element)
      {
          boundsCheck(index);
          double ret = get(index);
          array[index] = element;
          return ret;
      }
docs: Operates exactly as {@link #set(int, java.lang.Double) }
  @param index the index to set
  @param element the value to set
  @return the previous value at said index