title: What is the best way to compare floats for almost-equality in Python?
body: <p>It's well known that comparing floats for equality is a little fiddly due to rounding and precision issues.</p>
  <p>For example:
  <a href="https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/" rel="noreferrer">https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/</a></p>
  <p>What is the recommended way to deal with this in Python?</p>
  <p>Is a standard library function for this somewhere?</p>