code: public double addNewSample(double newSample) {
          final double sample = calculateLog(newSample);
          return Double.longBitsToDouble(valueEncodedAsLong.updateAndGet(value -> {
              return Double.doubleToRawLongBits(sample * newSampleWeight + (1.0 - newSampleWeight) * Double.longBitsToDouble(value));
          }));
      }
docs: Adds a new sample to the moving average and returns the updated value.
  
  @param newSample the new value to be added
  @return Double indicating the updated moving average value after adding a new sample.