### Question:
AtomicDouble extends Number { public boolean compareAndSet(double expect, double update) { long e = Double.doubleToLongBits(expect); long u = Double.doubleToLongBits(update); return value.compareAndSet(e, u); } AtomicDouble();  AtomicDouble(double init); double get(); double addAndGet(double amount); double getAndAdd(double amount); double getAndSet(double amount); boolean compareAndSet(double expect, double update); void set(double amount); void max(double v); @Override int intValue(); @Override long longValue(); @Override float floatValue(); @Override double doubleValue();  }### Answer:
@Test public void compareAndSet() { AtomicDouble v = new AtomicDouble(13.0); Assertions.assertTrue(v.compareAndSet(13.0, 42.0)); Assertions.assertEquals(42.0, v.get(), 1e-12); }