final long fn(long v, long x) {
        return Double.doubleToRawLongBits
                (Double.longBitsToDouble(v) +
                        Double.longBitsToDouble(x));
    }
final long fn ( long v , long x ) { return Double . doubleToRawLongBits ( Double . longBitsToDouble ( v ) + Double . longBitsToDouble ( x ) ) ; }
Update function. Note that we must use "long" for underlying
representations, because there is no compareAndSet for double,
due to the fact that the bitwise equals used in any CAS
implementation is not the same as double-precision equals.
However, we use CAS only to detect and alleviate contention,
for which bitwise equals works best anyway. In principle, the
long/double conversions used here should be essentially free on
most platforms since they just re-interpret bits.

Similar conversions are used in other methods.