title: How to get exact float value in python?
body: <p>I have a list of floating point numbers. I need to perform to certain addition and multiplication operations on these numbers and the logic of the code requires exact answer(Comparison with other numbers in the same list for example). But it does not give exact answer.The search for a solution to a similar problem suggested the use of decimal class. Still the same problem persisted. Here is an example below:</p>
  
  <pre><code>from decimal import Decimal
  Decimal(1.2)*Decimal(2)
  Decimal('2.399999999999999911182158030')
  </code></pre>