Predict

Float or Decimal?

Three comparisons. Think about where each number was born.

from decimal import Decimal

a = 0.1 + 0.2 == 0.3
b = Decimal("0.1") + Decimal("0.2") == Decimal("0.3")
c = Decimal(0.1) == Decimal("0.1")
print(a, b, c)

What does this program print?