android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
public final boolean compareAndSet(int i, double expect, double update) {
    return longs.compareAndSet(i, doubleToRawLongBits(expect), doubleToRawLongBits(update));
  }
public final boolean compareAndSet(int i, double expect, double update) {
    return longs.compareAndSet(i, doubleToRawLongBits(expect), doubleToRawLongBits(update));
  }
Atomically sets the element at position {@code i} to the given updated value if the current
value is <a href="#bitEquals">bitwise equal</a> to the expected value.

@param i the index
@param expect the expected value
@param update the new value
@return true if successful. False return indicates that the actual value was not equal to the
expected value.