SyntaxFix
Write A Post
Hire A Developer
Questions
I guess this is essentially putting it in a string, but this avoids the rounding error:
import decimal def display(x): digits = 15 temp = str(decimal.Decimal(str(x) + '0' * digits)) return temp[:temp.find('.') + digits + 1]