code: public double getAndSet(int i, double newValue)
      {
          long oldL = larray.getAndSet(i, Double.doubleToRawLongBits(newValue));
          return Double.longBitsToDouble(oldL);
      }
docs: Atomically sets the element at position {@code i} to the given value
  and returns the old value.
  
  @param i the index
  @param newValue the new value
  @return the previous value