code: func (s *memSeries) appendable(t int64, v float64) error {
  	c := s.head()
  	if c == nil {
  		return nil
  	}
  
  	if t > c.maxTime {
  		return nil
  	}
  	if t < c.maxTime {
  		return ErrOutOfOrderSample
  	}
  	// We are allowing exact duplicates as we can encounter them in valid cases
  	// like federation and erroring out at that time would be extremely noisy.
  	if math.Float64bits(s.sampleBuf[3].v) != math.Float64bits(v) {
  		return ErrAmendSample
  	}
  	return nil
  }
docs: // appendable checks whether the given sample is valid for appending to the series.